From: Matt S Trout Date: Tue, 6 Jul 2010 01:28:08 +0000 (+0100) Subject: POD test plus POD changes to make it pass X-Git-Tag: release_1.0.0~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FModule-Metadata.git;a=commitdiff_plain;h=2c11e51dbb73f22d9fe6cff453add28d34b427c6 POD test plus POD changes to make it pass --- diff --git a/lib/Module/Metadata.pm b/lib/Module/Metadata.pm index 6bfe11c..518b3a4 100644 --- a/lib/Module/Metadata.pm +++ b/lib/Module/Metadata.pm @@ -597,14 +597,9 @@ sub pod { 1; -__END__ - -=for :stopwords ModuleInfo - =head1 NAME -ModuleInfo - Gather package and POD information from a perl module file - +Module::Metadata - Gather package and POD information from perl module files =head1 DESCRIPTION @@ -675,13 +670,33 @@ optional parameter, otherwise @INC is searched. Can be called as either an object or a class method. -=back +=item package_versions_from_directory($dir, \@files?) + +Scans C<$dir> for .pm files (unless C<@files> is given, in which case looks +for those files in C<$dir> - and reads each file for packages and versions, +returning a hashref of the form: + { + 'Package::Name' => { + version => '0.123', + file => 'Package/Name.pm' + }, + 'OtherPackage::Name' => ... + } + +=item log_info (internal) + +Used internally to perform logging; imported from Log::Contextual if +Log::Contextual has already been loaded, otherwise simply calls warn. + +=back =head1 AUTHOR Ken Williams , Randy W. Sims +Released as Module::Metadata by Matt S Trout (mst) with +assistance from David Golden (xdg) =head1 COPYRIGHT @@ -690,10 +705,9 @@ Copyright (c) 2001-2006 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) +perl(1), L(3) =cut diff --git a/lib/Module/Metadata/Version.pm b/lib/Module/Metadata/Version.pm index fd0a976..d72a51a 100644 --- a/lib/Module/Metadata/Version.pm +++ b/lib/Module/Metadata/Version.pm @@ -42,6 +42,38 @@ use vars qw(@ISA); @ISA = qw(version); 1; + +=head1 NAME + +Module::Metadata::Version - inlined version.pm fallback for Module::Metadata + +=head1 DESCRIPTION + +This module either loads version.pm if available, or if not slurps its own +private copy of version::vpp into memory as a fallback, then makes itself +a subclass of whichever it found. + +This is a horrible hack. But so is version.pm. + +=head1 AUTHOR + +Ken Williams , Randy W. Sims + +Documented by Matt S Trout (mst) + +=head1 COPYRIGHT + +Copyright (c) 2001-2006 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 + __DATA__ # stub version module to make everything else happy package version; diff --git a/xt/pod.t b/xt/pod.t new file mode 100644 index 0000000..6b76a4a --- /dev/null +++ b/xt/pod.t @@ -0,0 +1,15 @@ +use Test::More; +use Test::Pod; +use Test::Pod::Coverage; +use strict; +use warnings FATAL => 'all'; + +# the all_ things attempt to plan, which we didn't want, so stop them +# from doing that +no warnings 'redefine'; +local *Test::Builder::plan = sub { }; + +all_pod_files_ok; +all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::CountParents' }); + +done_testing;