X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FModule%2FMetadata.pm;h=bbbee3592522deb9c32b5e3e5056bd33ded36d10;hb=d846be69c4b623809a79ca4b23c46a21ca69d9b3;hp=d5016008475542e51cc9428481714d72cfb5bb70;hpb=92ad06edd7e92c853458804adffad55cc0e08165;p=p5sagit%2FModule-Metadata.git diff --git a/lib/Module/Metadata.pm b/lib/Module/Metadata.pm index d501600..bbbee35 100644 --- a/lib/Module/Metadata.pm +++ b/lib/Module/Metadata.pm @@ -2,8 +2,8 @@ # vim:ts=8:sw=2:et:sta:sts=2 package Module::Metadata; -# stolen from Module::Build::Version and ::Base - this is perl licensed code, -# copyright them. +# Adapted from Perl-licensed code originally distributed with +# Module-Build by Ken Williams # This module provides routines to gather information about # perl modules (assuming this may be expanded in the distant @@ -11,7 +11,7 @@ package Module::Metadata; use strict; use vars qw($VERSION); -$VERSION = '1.000001'; +$VERSION = '1.000005'; $VERSION = eval $VERSION; use File::Spec; @@ -183,7 +183,6 @@ sub new_from_module { if ( $package eq $prime_package ) { if ( exists( $prime{$package} ) ) { - # M::B::ModuleInfo will handle this conflict die "Unexpected conflict in '$package'; multiple versions found.\n"; } else { $prime{$package}{file} = $mapped_filename; @@ -517,9 +516,9 @@ sub _evaluate_version_line { use version; no strict; - local $sigil$var; - \$$var=undef; \$vsub = sub { + local $sigil$var; + \$$var=undef; $line; \$$var }; @@ -654,14 +653,14 @@ Module::Metadata - Gather package and POD information from perl module files =item new_from_file($filename, collect_pod => 1) -Construct a C object given the path to a file. Takes an optional +Construct a C object given the path to a file. Takes an optional argument C which is a boolean that determines whether POD data is collected and stored for reference. POD data is not collected by default. POD headings are always collected. =item new_from_module($module, collect_pod => 1, inc => \@dirs) -Construct a C object given a module or package name. In addition +Construct a C object given a module or package name. In addition to accepting the C argument as described above, this method accepts a C argument which is a reference to an array of of directories to search for the module. If none are given, the @@ -747,14 +746,10 @@ assistance from David Golden (xdg) =head1 COPYRIGHT -Copyright (c) 2001-2006 Ken Williams. All rights reserved. +Copyright (c) 2001-2011 Ken Williams. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -=head1 SEE ALSO - -perl(1), L(3) - =cut