~ubuntu-branches/ubuntu/natty/libmodule-info-perl/natty

« back to all changes in this revision

Viewing changes to lib/Module/Info.pm

  • Committer: Bazaar Package Importer
  • Author(s): Jay Bonci
  • Date: 2005-03-08 11:55:35 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050308115535-8hcdm4hhazamhrch
Tags: 0.27-1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
require 5.004;
8
8
 
9
9
use vars qw($VERSION);
10
 
$VERSION = '0.24';
 
10
$VERSION = '0.27';
11
11
 
12
12
 
13
13
=head1 NAME
122
122
    my $mod_file = join('/', split('::', $name)) . '.pm';
123
123
    my $filepath = $INC{$mod_file} || '';
124
124
 
125
 
    my $module = Module::Info->new_from_file($filepath);
 
125
    my $module = Module::Info->new_from_file($filepath) or return;
126
126
    $module->{name} = $name;
127
127
    ($module->{dir} = $filepath) =~ s|/?\Q$mod_file\E$||;
128
128
    $module->{dir} = File::Spec->rel2abs($module->{dir});
213
213
# Thieved from ExtUtils::MM_Unix 1.12603
214
214
sub version {
215
215
    my($self) = shift;
 
216
    local($_, *MOD);
216
217
 
217
218
    my $parsefile = $self->file;
218
219