@@ -1,16 +1,26 @@
- - fix module NAME in Makefile.PL
- - minor doc corrections
- - fix in-memory file test on perl 5.6
+Revision history for Module-Reader
-0.002000 Feb 11, 2013
- - Improve documentation.
- - Add 'found' option for always loading from specific files.
+0.002003 - 2014-08-21
+ - fix dist name in meta files
-0.001002 Feb 2, 2013
- - fix copyright attribution
+0.002002 - 2014-08-16
+ - include README in dist
+ - include additional metadata
-0.001001 Feb 1, 2013
- - fix version number format
+0.002001 - Nov 23, 2013
+ - fix module NAME in Makefile.PL
+ - minor doc corrections
+ - fix in-memory file test on perl 5.6
-0.001000 Feb 1, 2013
- - initial version
+0.002000 - Feb 11, 2013
+ - Improve documentation.
+ - Add 'found' option for always loading from specific files.
+
+0.001002 - Feb 2, 2013
+ - fix copyright attribution
+
+0.001001 - Feb 1, 2013
+ - fix version number format
+
+0.001000 - Feb 1, 2013
+ - initial version
@@ -1,11 +1,12 @@
Changes
lib/Module/Reader.pm
+maint/Makefile.PL.include
Makefile.PL
MANIFEST This list of files
-MANIFEST.SKIP
t/00-load.t
t/lib/TestLib.pm
t/main.t
t/memory.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
+README README file (added by Distar)
@@ -1,57 +0,0 @@
-# Avoid version control files.
-\bRCS\b
-\bCVS\b
-\bSCCS\b
-,v$
-\B\.svn\b
-\B\.git\b
-\B\.gitignore\b
-\b_darcs\b
-\B\.cvsignore$
-
-# Avoid VMS specific MakeMaker generated files
-\bDescrip.MMS$
-\bDESCRIP.MMS$
-\bdescrip.mms$
-
-# Avoid Makemaker generated and utility files.
-\bMANIFEST\.bak
-\bMakefile$
-\bblib/
-\bMakeMaker-\d
-\bpm_to_blib\.ts$
-\bpm_to_blib$
-\bblibdirs\.ts$ # 6.18 through 6.25 generated this
-
-# Avoid Module::Build generated and utility files.
-\bBuild$
-\b_build/
-\bBuild.bat$
-\bBuild.COM$
-\bBUILD.COM$
-\bbuild.com$
-
-# Avoid temp and backup files.
-~$
-\.old$
-\#$
-\b\.#
-\.bak$
-\.tmp$
-\.#
-\.rej$
-
-# Avoid OS-specific files/dirs
-# Mac OSX metadata
-\B\.DS_Store
-# Mac OSX SMB mount metadata files
-\B\._
-
-# Avoid Devel::Cover and Devel::CoverX::Covered files.
-\bcover_db\b
-\bcovered\b
-
-# Avoid MYMETA files
-^MYMETA\.
-
-\bModule-Reader-
@@ -1,10 +1,10 @@
{
"abstract" : "Read the source of a module like perl does",
"author" : [
- "Graham Knop <haarg@haarg.org>"
+ "haarg - Graham Knop (cpan:HAARG) <haarg@haarg.org>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.82, CPAN::Meta::Converter version 2.132830",
+ "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141520",
"license" : [
"perl_5"
],
@@ -20,14 +20,10 @@
]
},
"prereqs" : {
- "build" : {
- "requires" : {
- "Test::More" : "0.88"
- }
- },
+ "build" : {},
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "6.3"
+ "ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
@@ -35,14 +31,27 @@
"Scalar::Util" : "0",
"perl" : "5.006"
}
+ },
+ "test" : {
+ "requires" : {
+ "Test::More" : "0.88"
+ }
}
},
"release_status" : "stable",
"resources" : {
- "homepage" : "http://github.com/haarg/Module-Reader",
+ "bugtracker" : {
+ "mailto" : "bug-Module-Reader@rt.cpan.org",
+ "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Reader"
+ },
+ "license" : [
+ "http://dev.perl.org/licenses/"
+ ],
"repository" : {
- "url" : "git://github.com/haarg/Module-Reader.git"
+ "type" : "git",
+ "url" : "git://github.com/haarg/Module-Reader",
+ "web" : "https://github.com/haarg/Module-Reader"
}
},
- "version" : "0.002001"
+ "version" : "0.002003"
}
@@ -1,26 +1,27 @@
---
abstract: 'Read the source of a module like perl does'
author:
- - 'Graham Knop <haarg@haarg.org>'
+ - 'haarg - Graham Knop (cpan:HAARG) <haarg@haarg.org>'
build_requires:
- Test::More: 0.88
+ Test::More: '0.88'
configure_requires:
- ExtUtils::MakeMaker: 6.3
+ ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.82, CPAN::Meta::Converter version 2.132830'
+generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.141520'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Module-Reader
no_index:
directory:
- t
- inc
requires:
- Scalar::Util: 0
- perl: 5.006
+ Scalar::Util: '0'
+ perl: '5.006'
resources:
- homepage: http://github.com/haarg/Module-Reader
- repository: git://github.com/haarg/Module-Reader.git
-version: 0.002001
+ bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Reader
+ license: http://dev.perl.org/licenses/
+ repository: git://github.com/haarg/Module-Reader
+version: '0.002003'
@@ -1,49 +1,80 @@
-{ require 5.006 }
use strict;
-use ExtUtils::MakeMaker 6.30;
-
-my %WriteMakefileArgs = (
- NAME => 'Module::Reader',
- AUTHOR => 'Graham Knop <haarg@haarg.org>',
- LICENSE => 'perl',
- ABSTRACT_FROM => 'lib/Module/Reader.pm',
- VERSION_FROM => 'lib/Module/Reader.pm',
-
- PREREQ_PM => {
- ($] < 5.008 ? ('IO::String' => 0) : ()),
- 'Scalar::Util' => 0,
- },
- BUILD_REQUIRES => {
- 'Test::More' => 0.88,
+use warnings FATAL => 'all';
+use 5.006;
+
+my %META = (
+ name => 'Module-Reader',
+ prereqs => {
+ configure => { requires => {
+ 'ExtUtils::MakeMaker' => 0,
+ } },
+ test => { requires => {
+ 'Test::More' => 0.88,
+ } },
+ runtime => { requires => {
+ 'perl' => '5.006',
+ 'Scalar::Util' => 0,
+ } },
+ },
+ resources => {
+ repository => {
+ url => 'git://github.com/haarg/Module-Reader',
+ web => 'https://github.com/haarg/Module-Reader',
+ type => 'git',
},
- CONFIGURE_REQUIRES => {
- 'ExtUtils::MakeMaker' => 6.30,
+ bugtracker => {
+ web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Reader',
+ mailto => 'bug-Module-Reader@rt.cpan.org',
},
- META_MERGE => {
- resources => {
- repository => 'git://github.com/haarg/Module-Reader.git',
- homepage => 'http://github.com/haarg/Module-Reader',
- },
- requires => {
- perl => 5.006,
- },
- }
+ license => [ 'http://dev.perl.org/licenses/' ],
+ },
+);
+
+my %MM_ARGS = (
+ PREREQ_PM => {
+ ($] < 5.008 ? ('IO::String' => 0) : ()),
+ },
);
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
- my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
- my $pp = $WriteMakefileArgs{PREREQ_PM};
- for my $mod ( keys %$br ) {
- if ( exists $pp->{$mod} ) {
- $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
- }
- else {
- $pp->{$mod} = $br->{$mod};
- }
- }
+## BOILERPLATE ###############################################################
+require ExtUtils::MakeMaker;
+(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
+
+# have to do this since old EUMM dev releases miss the eval $VERSION line
+my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
+my $mymeta = $eumm_version >= 6.57_02;
+my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
+
+($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
+($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
+$META{license} = [ $META{license} ]
+ if $META{license} && !ref $META{license};
+$MM_ARGS{LICENSE} = $META{license}[0]
+ if $META{license} && $eumm_version >= 6.30;
+$MM_ARGS{NO_MYMETA} = 1
+ if $mymeta_broken;
+$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
+ unless -f 'META.yml';
+
+for (qw(configure build test runtime)) {
+ my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
+ my $r = $MM_ARGS{$key} = {
+ %{$META{prereqs}{$_}{requires} || {}},
+ %{delete $MM_ARGS{$key} || {}},
+ };
+ defined $r->{$_} or delete $r->{$_} for keys %$r;
}
-delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
- unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
+
+delete $MM_ARGS{MIN_PERL_VERSION}
+ if $eumm_version < 6.47_01;
+$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
+ if $eumm_version < 6.63_03;
+$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
+ if $eumm_version < 6.55_01;
+delete $MM_ARGS{CONFIGURE_REQUIRES}
+ if $eumm_version < 6.51_03;
-WriteMakefile(%WriteMakefileArgs);
+ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
+## END BOILERPLATE ###########################################################
@@ -0,0 +1,46 @@
+NAME
+ Module::Reader - Read the source of a module like perl does
+
+SYNOPSIS
+ use Module::Reader qw(:all);
+ my $io = module_handle('My::Module');
+ my $content = module_content('My::Module');
+
+ my $io = module_handle('My::Module', @search_dirs);
+
+ my $io = module_handle('My::Module', @search_dirs, { found => \%INC });
+
+DESCRIPTION
+ Reads the content of perl modules the same way perl does. This includes
+ reading modules available only by @INC hooks, or filtered through them.
+
+EXPORTS
+ module_handle( $module_name, @search_dirs, \%options )
+ Returns an IO handle to the given module. Searches the directories
+ specified, or @INC if none are.
+
+ Options
+ found
+ A reference to a hash like %INC with module file names (in the style
+ 'My/Module.pm') as keys and full file paths as values. Modules
+ listed in this will be used in preference to searching through
+ directories.
+
+ module_content( $module_name, @search_dirs, \%options )
+ Returns the content of the given module. Accepts the same options as
+ "module_handle".
+
+AUTHOR
+ haarg - Graham Knop (cpan:HAARG) <haarg@haarg.org>
+
+ CONTRIBUTORS
+ None yet.
+
+COPYRIGHT
+ Copyright (c) 2013 the Module::Reader "AUTHOR" and "CONTRIBUTORS" as
+ listed above.
+
+LICENSE
+ This library is free software and may be distributed under the same
+ terms as perl itself.
+
@@ -3,7 +3,7 @@ BEGIN { require 5.006 }
use strict;
use warnings;
-our $VERSION = '0.002001';
+our $VERSION = '0.002003';
$VERSION = eval $VERSION;
use base 'Exporter';
@@ -0,0 +1,7 @@
+BEGIN { -e 'Distar' or system("git clone git://git.shadowcat.co.uk/p5sagit/Distar.git") }
+use lib 'Distar/lib';
+use Distar;
+
+use ExtUtils::MakeMaker 6.58;
+
+author 'haarg - Graham Knop (cpan:HAARG) <haarg@haarg.org>';