Dist-Metadata-0.925/0000755000175000017500000000000012105062622013136 5ustar randorandoDist-Metadata-0.925/t/0000755000175000017500000000000012105062622013401 5ustar randorandoDist-Metadata-0.925/t/archive.t0000644000175000017500000000454612105062622015220 0ustar randorandouse strict; use warnings; use Test::More 0.96; use Test::Fatal; my $mod = 'Dist::Metadata::Archive'; eval "require $mod" or die $@; # default_file_spec is( $mod->default_file_spec, 'Unix', 'most archive files use unix paths' ); test_constructor_errors($mod); # test file type determination my $base = 'corpus/Dist-Metadata-Test-NoMetaFile-0.1'; foreach my $test ( [Zip => "$base.zip"], [Tar => "$base.tar.gz"], ){ my ($type, $file) = @$test; my $distclass = "Dist::Metadata::$type"; # instantiate using base 'Archive' class which will determine subclass my $archive = new_ok($mod => [file => $file]); isa_ok($archive, $distclass); isa_ok($archive->archive, "Archive::$type"); # file is($archive->file, $file, 'dumb accessor works'); # determine_name_and_version $archive->determine_name_and_version(); is($archive->name, 'Dist-Metadata-Test-NoMetaFile', 'name from file'); is($archive->version, '0.1', 'version from file'); # file_content is( $archive->file_content('README'), qq[This "dist" is for testing Dist::Metadata.\n], 'got file content without specifying root dir' ); # perllocale says, "By default Perl ignores the current locale." # find_files is_deeply( [sort $archive->find_files], [qw( Dist-Metadata-Test-NoMetaFile-0.1/README Dist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile.pm Dist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile/PM.pm )], 'find_files' ); # list_files (no root) is_deeply( [sort $archive->list_files], [qw( README lib/Dist/Metadata/Test/NoMetaFile.pm lib/Dist/Metadata/Test/NoMetaFile/PM.pm )], 'files listed without root directory' ); # root is($archive->root, 'Dist-Metadata-Test-NoMetaFile-0.1', 'root dir'); # do this last so that successful new() has already loaded the distclass test_constructor_errors($distclass); } done_testing; # required_attribute # file doesn't exist sub test_constructor_errors { my $mod = shift; my $att = 'file'; is( $mod->required_attribute, $att, "'$att' attribute required" ); my $ex = exception { $mod->new() }; like($ex, qr/'$att' parameter required/, "new dies without '$att'"); my $dist = new_ok( $mod, [ file => 'does-not._exist_' ] ); $ex = exception { $dist->archive }; like($ex, qr/does not exist/, 'file does not exist'); } Dist-Metadata-0.925/t/00-report-prereqs.t0000644000175000017500000000367412105062622017007 0ustar randorando#!perl use strict; use warnings; use Test::More; use ExtUtils::MakeMaker; use File::Spec::Functions; use List::Util qw/max/; if ( $ENV{AUTOMATED_TESTING} ) { plan tests => 1; } else { plan skip_all => '$ENV{AUTOMATED_TESTING} not set'; } my @modules = qw( Archive::Tar Archive::Zip CPAN::DistnameInfo CPAN::Meta Carp Digest Digest::MD5 Digest::SHA ExtUtils::MakeMaker File::Basename File::Find File::Spec File::Spec::Functions File::Spec::Native File::Temp JSON JSON::PP List::Util Module::Metadata Path::Class Pod::Coverage::TrustPod Test::CPAN::Meta Test::Fatal Test::MockObject Test::More Test::Pod Test::Pod::Coverage Try::Tiny constant parent perl strict warnings ); # replace modules with dynamic results from MYMETA.json if we can # (hide CPAN::Meta from prereq scanner) my $cpan_meta = "CPAN::Meta"; if ( -f "MYMETA.json" && eval "require $cpan_meta" ) { ## no critic if ( my $meta = eval { CPAN::Meta->load_file("MYMETA.json") } ) { my $prereqs = $meta->prereqs; my %uniq = map {$_ => 1} map { keys %$_ } map { values %$_ } values %$prereqs; $uniq{$_} = 1 for @modules; # don't lose any static ones @modules = sort keys %uniq; } } my @reports = [qw/Version Module/]; for my $mod ( @modules ) { next if $mod eq 'perl'; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e catfile($_, $file) } @INC; if ( $prefix ) { my $ver = MM->parse_version( catfile($prefix, $file) ); $ver = "undef" unless defined $ver; # Newer MM should do this anyway push @reports, [$ver, $mod]; } else { push @reports, ["missing", $mod]; } } if ( @reports ) { my $vl = max map { length $_->[0] } @reports; my $ml = max map { length $_->[1] } @reports; splice @reports, 1, 0, ["-" x $vl, "-" x $ml]; diag "Prerequisite Report:\n", map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports; } pass; # vim: ts=2 sts=2 sw=2 et: Dist-Metadata-0.925/t/struct.t0000644000175000017500000000426612105062622015122 0ustar randorandouse strict; use warnings; use Test::More 0.96; use Test::Fatal; use Test::MockObject 1.09 (); use Path::Class 0.24 qw(file dir); my $mod = 'Dist::Metadata::Struct'; eval "require $mod" or die $@; # required_attribute { my $att = 'files'; is( $mod->required_attribute, $att, "'$att' attribute required" ); my $ex = exception { $mod->new() }; like( $ex, qr/'$att' parameter required/, "new dies without '$att'" ); } # don't create a dependency on IO::String or IO::Scalar for this simple test. my $io = Test::MockObject->new({}); $io->mock(getline => sub { 'read me' }); # file_content # find_files foreach my $test ( [ string => 'read me' ], [ scalar_ref => \'read me' ], [ io => $io ], ) { my ( $type, $content ) = @$test; my $dist = new_ok( $mod, [ files => { README => $content } ] ); is( $dist->file_content('README'), 'read me', "content returned for $type" ); is_deeply( [ $dist->find_files ], ['README'], 'all files listed' ); } { my $dist = new_ok( $mod, [ files => { 'root/README' => 'please', 'root/SECRET' => 'shhhh' } ] ); { my $dir = $dist->physical_directory('README'); ok( -d $dir, 'phyiscal directory exists' ); } my @dir_and_files = $dist->physical_directory('README'); is(scalar @dir_and_files, 2, 'list returned'); is($dir_and_files[1], file($dir_and_files[0], 'README'), 'full path to file'); ok(-e $dir_and_files[1], 'extracted file exists'); } # default_file_spec # file_spec # find_files # determine_packages { my $defspec = 'Unix'; my $spec = 'Win32'; my $dist = new_ok($mod, [file_spec => $spec, files => { README => 'nevermind', 'lib\\Mod\\Name.pm' => "package Mod::Name;\nour \$VERSION = 0.11;" }]); is( $dist->default_file_spec, $defspec, "struct defaults to $defspec" ); is( $dist->file_spec, $spec, "struct has custom spec: $spec" ); # TODO: should paths always come out in unix format? perhaps not if you specify an alternate... is_deeply( [sort $dist->find_files], ['README', 'lib\\Mod\\Name.pm'], 'all files listed' ); is_deeply( $dist->determine_packages, {'Mod::Name' => {file => 'lib/Mod/Name.pm', version => '0.11'}}, 'determined package with translated path' ); } done_testing; Dist-Metadata-0.925/t/no_index.t0000644000175000017500000000223212105062622015370 0ustar randorandouse strict; use warnings; use Test::More 0.96; use Path::Class qw( foreign_file ); my $mod = 'Dist::Metadata'; eval "require $mod" or die $@; $Dist::Metadata::VERSION ||= 0; # quiet warnings # specifically test that expected paths are not indexed on various platforms foreach my $spec ( qw(Unix Win32 Mac) ){ my $dm = new_ok($mod, [struct => { file_spec => $spec, files => { README => 'nevermind', foreign_file($spec => qw(lib Mod Name.pm)) => "package Mod::Name;\nour \$VERSION = 0.11;", foreign_file($spec => qw(inc No.pm)) => "package No;\nour \$VERSION = 0.11;", foreign_file($spec => qw(t lib YU.pm)) => "package YU;\nour \$VERSION = 0.11;", } }]); is $dm->dist->file_spec, $spec, "dist faking file spec: $spec"; is_deeply [sort $dm->dist->perl_files], [sort grep { !/README/ } keys %{ $dm->dist->{files} }], 'perl files listed'; is_deeply $dm->package_versions, {'Mod::Name' => '0.11'}, 't and inc not indexed'; is_deeply $dm->determine_packages, {'Mod::Name' => {file => 'lib/Mod/Name.pm', version => '0.11'}}, 'determined package with translated path'; } done_testing; Dist-Metadata-0.925/t/package_versions.t0000644000175000017500000000171512105062622017115 0ustar randorandouse strict; use warnings; use Test::More 0.96; my $mod = 'Dist::Metadata'; eval "require $mod" or die $@; { foreach my $test ( [ { buzzwords => { file => 'lib/buzzwords.pm', version => '0.1', }, }, { buzzwords => '0.1', } ], [ { fulfillment_issues => { file => 'lib/fulfillment_issues.pm' } }, { fulfillment_issues => undef, } ], [ { 'Design::Patterns' => { file => 'lib/Design/Patterns.pm', version => 0.2 }, 'Paradigm::Shift' => { file => 'lib/Paradigm/Shift.pm', version => 'v1.3.5', } }, { 'Design::Patterns' => 0.2, 'Paradigm::Shift' => 'v1.3.5', }, ], ){ my ($provides, $exp) = @$test; is_deeply($mod->package_versions($provides), $exp, 'package_versions'); } } done_testing; Dist-Metadata-0.925/t/00-compile.t0000644000175000017500000000307712105062622015442 0ustar randorando#!perl use strict; use warnings; use Test::More; use File::Find; use File::Temp qw{ tempdir }; my @modules; find( sub { return if $File::Find::name !~ /\.pm\z/; my $found = $File::Find::name; $found =~ s{^lib/}{}; $found =~ s{[/\\]}{::}g; $found =~ s/\.pm$//; # nothing to skip push @modules, $found; }, 'lib', ); sub _find_scripts { my $dir = shift @_; my @found_scripts = (); find( sub { return unless -f; my $found = $File::Find::name; # nothing to skip open my $FH, '<', $_ or do { note( "Unable to open $found in ( $! ), skipping" ); return; }; my $shebang = <$FH>; return unless $shebang =~ /^#!.*?\bperl\b\s*$/; push @found_scripts, $found; }, $dir, ); return @found_scripts; } my @scripts; do { push @scripts, _find_scripts($_) if -d $_ } for qw{ bin script scripts }; my $plan = scalar(@modules) + scalar(@scripts); $plan ? (plan tests => $plan) : (plan skip_all => "no tests to run"); { # fake home for cpan-testers local $ENV{HOME} = tempdir( CLEANUP => 1 ); like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) for sort @modules; SKIP: { eval "use Test::Script 1.05; 1;"; skip "Test::Script needed to test script compilation", scalar(@scripts) if $@; foreach my $file ( @scripts ) { my $script = $file; $script =~ s!.*/!!; script_compiles( $file, "$script script compiles" ); } } } Dist-Metadata-0.925/t/zip.t0000644000175000017500000000074212105062622014373 0ustar randorandouse strict; use warnings; use Test::More 0.96; my $mod = 'Dist::Metadata::Zip'; eval "require $mod" or die $@; my $base = 'corpus/Dist-Metadata-Test-NoMetaFile-0.1'; # test that instantiating this class directly does not negotiate type new_ok($mod => [file => "$base.tgz"]); my $file = "$base.zip"; my $zip = new_ok($mod => [file => $file]); # file_content, and find_files tested in t/archive.t # read_archive isa_ok($zip->read_archive($file), 'Archive::Zip'); done_testing; Dist-Metadata-0.925/t/dists.t0000644000175000017500000001256012105062622014720 0ustar randorandouse strict; use warnings; use Test::More 0.96; use Path::Class 0.24 qw(file); my $mod = 'Dist::Metadata'; eval "require $mod" or die $@; $Dist::Metadata::VERSION ||= 0; # quiet warnings # we may need to prepend $FindBin::Bin my $root = 'corpus'; my $structs = do "$root/structs.pl"; # NOTE: Portability tests report issues with file names being long # and containing periods, so there could be issues... foreach my $test ( [ [ metafile => 'Dist-Metadata-Test-MetaFile-2.2', ], { name => 'Dist-Metadata-Test-MetaFile', version => '2.2', provides => { 'Dist::Metadata::Test::MetaFile' => { file => 'lib/Dist/Metadata/Test/MetaFile.pm', version => '2.1', }, 'Dist::Metadata::Test::MetaFile::PM' => { file => 'lib/Dist/Metadata/Test/MetaFile/PM.pm', version => '2.0', }, }, }, ], [ [ metafile_incomplete => 'Dist-Metadata-Test-MetaFile-Incomplete-2.1', ], { name => 'Dist-Metadata-Test-MetaFile-Incomplete', version => '2.1', provides => { 'Dist::Metadata::Test::MetaFile::Incomplete' => { file => 'lib/Dist/Metadata/Test/MetaFile/Incomplete.pm', version => '2.1', }, }, }, ], [ [ nometafile => 'Dist-Metadata-Test-NoMetaFile-0.1', ], { name => 'Dist-Metadata-Test-NoMetaFile', version => '0.1', provides => { 'Dist::Metadata::Test::NoMetaFile' => { file => 'lib/Dist/Metadata/Test/NoMetaFile.pm', version => '0.1', }, 'Dist::Metadata::Test::NoMetaFile::PM' => { file => 'lib/Dist/Metadata/Test/NoMetaFile/PM.pm', version => '0.1', }, }, }, ], [ [ index_like_pause => 'Dist-Metadata-Test-LikePause-0.1', ], { name => 'Dist-Metadata-Test-LikePause', version => '0.1', provides => { 'Dist::Metadata::Test::LikePause' => { file => 'lib/Dist/Metadata/Test/LikePause.pm', version => '0.1', }, }, }, ], [ [ index_like_pause => 'Dist-Metadata-Test-LikePause-0.1', ], { name => 'Dist-Metadata-Test-LikePause', version => '0.1', provides => { 'Dist::Metadata::Test::LikePause' => { file => 'lib/Dist/Metadata/Test/LikePause.pm', version => '0.1', }, 'ExtraPackage' => { file => 'lib/Dist/Metadata/Test/LikePause.pm', version => '0.2', }, }, }, { # this we should find the Extra (inner) package include_inner_packages => 1, }, ], [ [ nometafile_dev_release => 'Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1', ], { name => 'Dist-Metadata-Test-NoMetaFile-DevRelease', version => '0.1_1', provides => { 'Dist::Metadata::Test::NoMetaFile::DevRelease' => { file => 'lib/Dist/Metadata/Test/NoMetaFile/DevRelease.pm', version => '0.1_1', }, }, }, ], [ [ subdir => 'Dist-Metadata-Test-SubDir-1.5', 'subdir', ], { name => 'Dist-Metadata-Test-SubDir', version => '1.5', provides => { 'Dist::Metadata::Test::SubDir' => { file => 'lib/Dist/Metadata/Test/SubDir.pm', version => '1.1', }, 'Dist::Metadata::Test::SubDir::PM' => { file => 'lib/Dist/Metadata/Test/SubDir/PM.pm', version => '1.0', }, }, }, ], [ 'noroot', { # can't guess name/version without formatted file name or root dir name => 'noroot', # modified in loop version => '0', provides => { 'Dist::Metadata::Test::NoRoot' => { file => 'lib/Dist/Metadata/Test/NoRoot.pm', version => '3.3', }, 'Dist::Metadata::Test::NoRoot::PM' => { file => 'lib/Dist/Metadata/Test/NoRoot/PM.pm', version => '3.25', }, }, }, ], ){ my ( $dists, $exp, $opts ) = @$test; $exp->{package_versions} = do { my $p = $exp->{provides}; +{ map { ($_ => $p->{$_}{version}) } keys %$p }; }; $dists = [ ($dists) x 2 ] unless ref $dists; my ($key, $file, $dir) = @$dists; $dir ||= $file; $_ = "corpus/$_" for ($file, $dir); $_ = file($root, $_)->stringify for @$dists; foreach my $args ( [file => "$file.tar.gz"], [file => "$file.zip"], [dir => $dir], [struct => { files => $structs->{$key} }], ){ push @{ $args }, %{ $opts || {} }; my $dm = new_ok( $mod, $args ); # minimal name can be determined from file or dir but not struct $exp->{name} = Dist::Metadata::UNKNOWN() if $key eq 'noroot' && $args->[0] eq 'struct'; # FIXME: perl 5.6.2 weirdness: http://www.cpantesters.org/cpan/report/4297a762-a314-11e0-b62c-be5be1de4735 # # Failed test 'verify corpus/noroot/lib/Dist/Metadata/Test/NoRoot/PM.pm for dir corpus/noroot' # # at t/dists.t line 124. # # Structures begin differing at: # # $got = HASH(0x11c22d0) # # $expected = undef is_deeply( $dm->$_, $exp->{$_}, "verify $_ for @$args" ) || dump_if_automated([$dm, $_, $exp]) for keys %$exp; } } done_testing; sub dump_if_automated { diag(explain(@_)) if $ENV{AUTOMATED_TESTING}; } Dist-Metadata-0.925/t/dir.t0000644000175000017500000000565012105062622014352 0ustar randorandouse strict; use warnings; use Test::More 0.96; use Test::Fatal; use Test::MockObject 1.09 (); use Path::Class 0.24 qw(file dir); use File::Spec (); my $tmpdir = File::Spec->tmpdir; my $mod = 'Dist::Metadata::Dir'; eval "require $mod" or die $@; # required_attribute # extract_into { my $att = 'dir'; is($mod->required_attribute, $att, "'$att' attribute required"); my $ex = exception { $mod->new() }; like($ex, qr/'$att' parameter required/, "new dies without '$att'"); $ex = exception { $mod->new(dir => $tmpdir)->extract_into($tmpdir) }; like( $ex, qr/A directory doesn't need to be extracted/, 'no extraction' ); } # default_file_spec is( $mod->default_file_spec, 'Native', 'default to native file spec for dir' ); # dir # file_content # find_files # physical_directory { # with no root dir my $path = dir( qw(corpus noroot) ); my $dir = $path->stringify; my $dist = new_ok( $mod, [ dir => $dir ] ); test_phys_dir($dist, $dir, $path); my @files = ( file( qw(lib Dist Metadata Test NoRoot PM.pm) )->stringify, file( qw(lib Dist Metadata Test NoRoot.pm) )->stringify, 'README' ); # no root, same as below is_deeply([sort $dist->find_files], [sort @files], 'all files listed (full paths)'); # root stripped is_deeply([sort $dist->list_files], [sort @files], 'all files listed (no root)'); } # with root dir { my $path = dir( qw(corpus subdir) ); my $dir = $path->stringify; my $dist = new_ok( $mod, [ dir => $dir ] ); test_phys_dir($dist, $dir, $path->subdir($dist->root)); my @files = ( file( qw(lib Dist Metadata Test SubDir PM.pm) )->stringify, file( qw(lib Dist Metadata Test SubDir.pm) )->stringify, 'README' ); # root present is_deeply([sort $dist->find_files], [sort map { file($dist->root, $_)->stringify } @files], 'all files listed (full paths)'); # root stripped is_deeply([sort $dist->list_files], [sort @files], 'all files listed (no root)'); } # determine_name_and_version { my %nv = (name => 'Dist-Metadata-Test-MetaFile', version => 2.2); my $dir = dir( 'corpus', join('-', @nv{qw(name version)}) ); my $dist = new_ok( $mod, [ dir => $dir ] ); ok(!exists($dist->{$_}), "no dist $_" ) for keys %nv; $dist->determine_name_and_version; is($dist->$_, $nv{$_}, "determined dist $_" ) for keys %nv; } done_testing; sub test_phys_dir { my ($dist, $dir, $subroot) = @_; $subroot = $subroot->absolute; is( $dist->dir, $dir, 'dir attribute from constructor arg' ); is( $dist->physical_directory, $subroot, 'dir + root' ); is_deeply( [$dist->physical_directory('README')], [$subroot, $subroot->file('README')], 'physical directory with adjusted file' ); is( $dist->file_content('README'), qq[This "dist" is for testing Dist::Metadata.\n], 'file content' ); like( exception { $dist->file_content('missing.file') }, qr{Failed to open file 'corpus.+\w+.+missing\.file':}, 'die on missing file' ); } Dist-Metadata-0.925/t/module_info.t0000644000175000017500000000677512105062622016105 0ustar randorandouse strict; use warnings; use Test::More 0.96; use Test::Fatal; use Path::Class; my $mod = 'Dist::Metadata'; eval "require $mod" or die $@; test_module_info( [file => file(qw(corpus Dist-Metadata-Test-NoMetaFile-0.1.tar.gz))->stringify], { 'Dist::Metadata::Test::NoMetaFile' => { file => 'lib/Dist/Metadata/Test/NoMetaFile.pm', version => '0.1', md5 => 'd4a5a07d20dd1fdad6191d5950287609', sha1 => '99d1aa7e3dbaa54dc16f178a8a4d2a9ba4d33da2', sha256 => '7d888a6c321041adbc1225b3ca12ae22ebfccdf221e5e3f0ccb2dec1a9c0a71a', }, 'Dist::Metadata::Test::NoMetaFile::PM' => { file => 'lib/Dist/Metadata/Test/NoMetaFile/PM.pm', version => '0.1', md5 => '6e8845e06e7297bc913ebf3f1447c89a', sha1 => '843ce5cd5443c7ae2792f7b58e069fcab64963c8', sha256 => 'bc61da45e576a43155fcf296d03f74532bfe3a410f88aeaa75ade9155f67d049', }, }, ); test_module_info( [file => file(qw(corpus Dist-Metadata-Test-MetaFile-2.2.zip))->stringify], { 'Dist::Metadata::Test::MetaFile' => { file => 'lib/Dist/Metadata/Test/MetaFile.pm', version => '2.1', md5 => '95fe72abee727b584941eda6da89f049', sha1 => '2c4341d7778a78702e364f2c38c6c97b8410387d', sha256 => '17dbde0b5b534d2a9ff9d188133da11670e3909ce853ac333aaa6973b348701e', }, 'Dist::Metadata::Test::MetaFile::PM' => { file => 'lib/Dist/Metadata/Test/MetaFile/PM.pm', version => '2.0', md5 => '873b2db91af4418020350d3337f6c173', sha1 => '29553e76693b13b1e3d9f4493ee9d05c4cd4f6fb', sha256 => '53c79b083cb731e2f642ae409459756a483b6912b99ed61c34edbbfb483ea7d1', }, } ); { my $args = [ struct => { files => { 'fb/lib/Foo/Bar.pm' => "package Foo::Bar;\nour \$VERSION = 13;\n", 'fb/README.txt' => "anything\n", } } ]; my $exp = { 'Foo::Bar' => { file => 'lib/Foo/Bar.pm', version => '13', md5 => '8642ef750b6ca0d9c9afe5db4174e009', sha1 => '2a4899cefacd1defd114731fec0e58c747eb9471', sha256 => '368e2f18d80a866537153885807ddf6e0733168b683b0a7ecac6d257943ac894', }, }; test_module_info($args, $exp); my $dm = new_ok($mod => $args); my $provides = { 'Who::Cares' => { file => 'README.txt', version => 0, }, }; # specify our own 'provides' my $mi = $dm->module_info({digest => ['MD5', 'SHA-256'], provides => $provides}); # use official names my $checksums = { 'MD5' => 'f5b1321af715fbd4866590170ddbe8f6', 'SHA-256' => 'ce32b18ae7f79e70f7cde4cf6077ae8b4195044307a78a4ea8761ddfedf9badc', }; @{ $provides->{'Who::Cares'} }{ keys %$checksums } = values %$checksums; is_deeply $provides, $mi, 'module info with official checksum names'; } done_testing; sub test_module_info { my ($args, $info) = @_; my $dm = new_ok($mod => $args); my $p = $dm->provides; { my $m = $dm->module_info; is_deeply $p, $m, 'provides and module_info have the same'; is_deeply limit_keys($info), $m, 'sanity check - no checksums'; } foreach my $checksums ( 'md5', ['sha1'], [qw(md5 sha256)], ){ is_deeply limit_keys($info, $checksums), $dm->module_info({checksum => $checksums}); } } sub limit_keys { my $hash = { %{ shift() } }; my @keys = map { ref($_) eq 'ARRAY' ? @$_ : $_ } (qw(file version), @_); foreach my $mod ( keys %$hash ){ my $info = delete $hash->{ $mod }; my $new = $hash->{ $mod } = {}; @$new{ @keys } = @$info{ @keys }; } return $hash; } Dist-Metadata-0.925/t/tar.t0000644000175000017500000000123212105062622014352 0ustar randorandouse strict; use warnings; use Test::More 0.96; my $mod = 'Dist::Metadata::Tar'; eval "require $mod" or die $@; my $base = 'corpus/Dist-Metadata-Test-NoMetaFile-0.1'; # test that instantiating this class directly does not negotiate type new_ok($mod => [file => "$base.zip"]); my $file = "$base.tar.gz"; my $tar = new_ok($mod => [file => $file]); # file_content, and find_files tested in t/archive.t # read_archive isa_ok($tar->read_archive($file), 'Archive::Tar'); # tar { my $warning; local $SIG{__WARN__} = sub { $warning = $_[0] }; isa_ok($tar->tar, 'Archive::Tar'); like($warning, qr/deprecated/, 'tar() works but is deprecated'); } done_testing; Dist-Metadata-0.925/t/determine.t0000644000175000017500000000656112105062622015552 0ustar randorandouse strict; use warnings; use Test::More 0.96; my $mod = 'Dist::Metadata'; my $smod = "${mod}::Struct"; eval "require $_" || die $@ for $mod, $smod; $Dist::Metadata::VERSION ||= 0; # avoid undef warnings { foreach my $test ( [ '/tmp/No-Existy-1.01', [], ['No-Existy', '1.01'], undef # same ], [ # main module: No::Existy::3 (like perl5i::2) 'No-Existy-3-v2.1.3', [], ['No-Existy-3', 'v2.1.3'], undef # same ], [ # constructor args override 'No-Existy-3-v2.1.3', [ name => 'Who-Cares' ], ['No-Existy-3', 'v2.1.3'], ['Who-Cares', 'v2.1.3'], ], [ # constructor args override 'No-Existy-3-v2.1.3', [ name => 'Who-Cares', version => 5, ], ['No-Existy-3', 'v2.1.3'], ['Who-Cares', '5'], ], ){ my ($base, $args, $parsed, $att) = @$test; $att ||= $parsed; # test dir name and tar file name foreach my $path ( $base, "$base.tar.gz", "$base.tgz" ){ my $dm = new_ok($smod, [files => {}, @$args]); my @nv = $dm->parse_name_and_version($path); is_deeply(\@nv, $parsed, 'parsed name and version'); $dm->set_name_and_version(@nv); is_deeply([$dm->name, $dm->version], $att, "set dist name and version"); } } } { my $struct = { files => { 'README' => 'we need a file to establish the root dir', 'lib/Bunnies.pm' => <<'BUNNIES', package Bunnies; our $VERSION = 2.3; package # comment HiddenBunnies; our $VERSION = 2.4; package TooManyBunnies; our $VERSION = 2.5; BUNNIES 'lib/Rabbit/Hole.pm' => <<'HOLE', package Rabbit::Hole; our $VERSION = '1.1'; package Rabbit::Hole::Cover; our $VERSION = '1.1'; HOLE # Test something that doesn't match the "simile" regexp in DM:determine_packages. # Module::Metadata 1.000009 will find this but for obvious reasons PAUSE would not index it. # If MM stops finding this we'll have to determine if there are # any other possible file names that wouldn't match the regexp. 'lib/.pm' => <<'GOOFY', package Goofy; our $VERSION = '0.1'; GOOFY }, }; is_deeply new_ok($mod, [struct => $struct, include_inner_packages => 1])->determine_packages, { Bunnies => { file => 'lib/Bunnies.pm', version => '2.3', }, TooManyBunnies => { file => 'lib/Bunnies.pm', version => '2.5', }, Goofy => { file => 'lib/.pm', version => '0.1', }, 'Rabbit::Hole' => { file => 'lib/Rabbit/Hole.pm', version => '1.1' }, 'Rabbit::Hole::Cover' => { file => 'lib/Rabbit/Hole.pm', version => '1.1' }, }, 'determine all (not hidden) packages'; is_deeply new_ok($mod, [struct => $struct])->determine_packages, { Bunnies => { file => 'lib/Bunnies.pm', version => '2.3', }, 'Rabbit::Hole' => { file => 'lib/Rabbit/Hole.pm', version => '1.1' }, }, 'determine only "simile" packages'; { my $dm = new_ok($mod, [struct => $struct]); my $cpan_meta = $dm->default_metadata; push @{ $cpan_meta->{no_index}{namespace} ||= [] }, 'Rabbit'; # this is only about bunnies is_deeply $dm->determine_packages($dm->meta_from_struct($cpan_meta)), { Bunnies => { file => 'lib/Bunnies.pm', version => '2.3', }, }, 'determine only loadable modules, minus no_index/namespace'; } } done_testing; Dist-Metadata-0.925/t/file_spec.t0000644000175000017500000000156712105062622015530 0ustar randorandouse strict; use warnings; use Test::More 0.96; my $mod = 'Dist::Metadata::Struct'; eval "require $mod" or die $@; # all these translate into "Native" foreach my $test ( [ '' => 'Native' ], [ qw( File::Spec Native ) ], [ qw( File::Spec::Native Native ) ], [ qw( Native Native ) ], [ qw( Win32 Win32 ) ], [ qw( File::Spec::Win32 Win32 ) ], ) { my ( $spec, $exp ) = @$test; my $dist = new_ok( $mod, [ file_spec => $spec, files => {} ] ); is( $dist->file_spec, $exp, "spec '$spec' => '$exp'" ); } # test using default File::Spec { my $dist = new_ok( $mod, [ file_spec => '', files => { README => 'read me', 'Module.pm' => \"package Some::Module;\nour \$VERSION = 2;", } ] ); is_deeply( $dist->determine_packages, {'Some::Module' => { file => 'Module.pm', version => 2 }}, 'found package in root' ); } done_testing; Dist-Metadata-0.925/t/load_meta.t0000644000175000017500000000276412105062622015524 0ustar randorandouse strict; use warnings; use Test::More 0.96; use Test::MockObject 1.09; my ( $default, $loaded, $created ) = (-1) x 3; Test::MockObject->new->fake_module('CPAN::Meta', VERSION => sub { 2 }, new => sub { bless { %{ $_[1] } }, $_[0] }, create => sub { $created = $_[1]; shift->new(@_) }, #as_struct => sub { +{ %{ $_[0] } } }, # unbless (map { ( $_ => sub { undef } ) } qw(name version provides)), map { ( "load_${_}_string" => sub { $loaded = $_[1]; $_[0]->new({loaded => $_[1]}); } ) } qw(json yaml) ); my $mod = 'Dist::Metadata'; eval "require $mod" or die $@; $Dist::Metadata::VERSION ||= 0; # quiet warnings foreach my $test ( [ json => j => { 'META.json' => 'j' } ], [ yaml => y => { 'META.yml' => 'y' } ], # usually it's spelled .yml but yaml spec suggests .yaml [ yaml => y => { 'tar/META.yaml' => 'y' } ], # json preferred [ json => j => { 'tar/META.json' => 'j', 'tar/META.yaml' => 'y' } ], ) { my ( $type, $content, $files ) = @$test; my $struct = { files => $files }; new_ok( $mod, [ struct => $struct, determine_packages => 0 ] )->load_meta; is( $loaded, $content, "loaded $type" ); is( $created, $default, "loaded not created" ); } reset_vars(); new_ok( $mod, [ struct => { files => { 'README' => 'nevermind' } }, determine_packages => 0 ] )->load_meta; is( $loaded, $default, 'meta file not found, not loaded' ); is( ref($created), 'HASH', 'hash passed to create()' ); done_testing; sub reset_vars { ( $loaded, $created ) = ($default) x 2; } Dist-Metadata-0.925/Makefile.PL0000644000175000017500000000321512105062622015111 0ustar randorando use strict; use warnings; use 5.006; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Information about a perl module distribution", "AUTHOR" => "Randy Stauner ", "BUILD_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Spec::Functions" => 0, "Test::Fatal" => 0, "Test::MockObject" => "1.09", "Test::More" => "0.96" }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Dist-Metadata", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "Dist::Metadata", "PREREQ_PM" => { "Archive::Tar" => 1, "Archive::Zip" => "1.30", "CPAN::DistnameInfo" => "0.12", "CPAN::Meta" => "2.1", "Carp" => 0, "Digest" => "1.03", "Digest::MD5" => 2, "Digest::SHA" => 5, "File::Basename" => 0, "File::Find" => 0, "File::Spec::Native" => "1.002", "File::Temp" => "0.19", "List::Util" => 0, "Module::Metadata" => 0, "Path::Class" => "0.24", "Try::Tiny" => "0.09", "constant" => 0, "parent" => 0, "strict" => 0, "warnings" => 0 }, "VERSION" => "0.925", "test" => { "TESTS" => "t/*.t" } ); 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}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Dist-Metadata-0.925/README0000644000175000017500000000047012105062622014017 0ustar randorando This archive contains the distribution Dist-Metadata, version 0.925: Information about a perl module distribution This software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Dist-Metadata-0.925/lib/0000755000175000017500000000000012105062622013704 5ustar randorandoDist-Metadata-0.925/lib/Dist/0000755000175000017500000000000012105062622014607 5ustar randorandoDist-Metadata-0.925/lib/Dist/Metadata/0000755000175000017500000000000012105062622016327 5ustar randorandoDist-Metadata-0.925/lib/Dist/Metadata/Dir.pm0000644000175000017500000000742012105062622017406 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: # # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package Dist::Metadata::Dir; { $Dist::Metadata::Dir::VERSION = '0.925'; } BEGIN { $Dist::Metadata::Dir::AUTHORITY = 'cpan:RWSTAUNER'; } # ABSTRACT: Enable Dist::Metadata for a directory use Carp qw(croak carp); # core use File::Find (); # core use Path::Class 0.24 (); use parent 'Dist::Metadata::Dist'; push(@Dist::Metadata::CARP_NOT, __PACKAGE__); sub new { my $class = shift; my $self = $class->SUPER::new(@_); # fix up dir (for example chop trailing slash if present) $self->{dir} = $self->path_class_dir->new($self->{dir})->stringify; # TODO: croak if not -d $self->dir return $self; } sub required_attribute { 'dir' } sub determine_name_and_version { my ($self) = @_; # 'root' may be more accurate than 'dir' $self->SUPER::determine_name_and_version(); $self->set_name_and_version( $self->parse_name_and_version( $self->dir ) ); return; } sub dir { $_[0]->{dir}; } # this shouldn't be called sub extract_into { croak q[A directory doesn't need to be extracted]; } sub file_content { my ($self, $file) = @_; # This is a directory so file spec will always be native my $path = $self->path_class_file ->new( $self->{dir}, $self->full_path($file) )->stringify; open(my $fh, '<', $path) or croak "Failed to open file '$path': $!"; return do { local $/; <$fh> }; } sub find_files { my ($self) = @_; my $dir = $self->{dir}; my @files; File::Find::find( { wanted => sub { push @files, $self->path_class_file->new($_)->relative($dir)->stringify if -f $_; }, no_chdir => 1 }, $dir ); return @files; } sub physical_directory { my ($self, @files) = @_; # TODO: return absolute_path? my @parts = $self->{dir}; # go into root dir if there is one push @parts, $self->root if $self->root; my $dir = $self->path_class_dir->new(@parts)->absolute; return $dir->stringify unless wantarray; return map { $_->stringify } ($dir, map { $dir->file( $_ ) } @files); } 1; __END__ =pod =encoding utf-8 =for :stopwords Randy Stauner ACKNOWLEDGEMENTS TODO dist dists dir unix checksum checksums =head1 NAME Dist::Metadata::Dir - Enable Dist::Metadata for a directory =head1 VERSION version 0.925 =head1 SYNOPSIS my $dm = Dist::Metadata->new(dir => $path_to_dir); =head1 DESCRIPTION This is a subclass of L to enable getting the dists metadata from a directory. This can be useful if you already have a dist extracted into a directory. It's probably not very useful on it's own though, and should be used from L. =head1 METHODS =head2 new $dist = Dist::Metadata::Struct->new(dir => $path); Accepts a single 'dir' argument that should be a path to a directory. =head2 determine_name_and_version Attempts to parse name and version from directory name. =head2 dir Returns the C attribute specified in the constructor. =head2 file_content Returns the content for the specified file. =head2 find_files Returns a list of the file names beneath the directory (relative to the directory). =head2 physical_directory Returns the C attribute since this is already a directory containing the desired files. =for test_synopsis my $path_to_dir; =head1 AUTHOR Randy Stauner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Dist-Metadata-0.925/lib/Dist/Metadata/Struct.pm0000644000175000017500000000555712105062622020165 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: # # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package Dist::Metadata::Struct; { $Dist::Metadata::Struct::VERSION = '0.925'; } BEGIN { $Dist::Metadata::Struct::AUTHORITY = 'cpan:RWSTAUNER'; } # ABSTRACT: Enable Dist::Metadata for a data structure use Carp qw(croak carp); # core use parent 'Dist::Metadata::Dist'; push(@Dist::Metadata::CARP_NOT, __PACKAGE__); sub required_attribute { 'files' } sub default_file_spec { 'Unix' } sub file_content { my ($self, $file) = @_; # TODO: should we croak if not found? would be consistent with Dir my $content = $self->{files}{ $self->full_path($file) }; # 5.10: given(ref($content)) if( my $ref = ref $content ){ local $/; # do this here because of perl bug prior to perl 5.15 (7c2d9d0) return $ref eq 'SCALAR' # allow a scalar ref ? $$content # or an IO-like object : $content->getline; } # else a simple string return $content; } sub find_files { my ($self) = @_; return keys %{ $self->{files} }; } 1; __END__ =pod =encoding utf-8 =for :stopwords Randy Stauner ACKNOWLEDGEMENTS TODO dist dists dir unix checksum checksums =head1 NAME Dist::Metadata::Struct - Enable Dist::Metadata for a data structure =head1 VERSION version 0.925 =head1 SYNOPSIS my $dm = Dist::Metadata->new(struct => { files => { 'lib/Mod.pm' => 'package Mod; sub something { ... }', 'README' => 'this is a fake dist, useful for testing', } }); =head1 DESCRIPTION This is a subclass of L to enable mocking up a dist from perl data structures. This is mostly used for testing but might be useful if you already have an in-memory representation of a dist that you'd like to examine. It's probably not very useful on it's own though, and should be used from L. =head1 METHODS =head2 new $dist = Dist::Metadata::Struct->new(files => { 'lib/Mod.pm' => 'package Mod; sub something { ... }', }); Accepts a C parameter that should be a hash of C<< { name => content, } >>. Content can be a string, a reference to a string, or an IO object. =head2 default_file_spec C is the default for consistency/simplicity but C can be overridden in the constructor. =head2 file_content Returns the string content for the specified name. =head2 find_files Returns the keys of the C hash. =head1 AUTHOR Randy Stauner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Dist-Metadata-0.925/lib/Dist/Metadata/Dist.pm0000644000175000017500000003506712105062622017603 0ustar randorando# # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package Dist::Metadata::Dist; { $Dist::Metadata::Dist::VERSION = '0.925'; } BEGIN { $Dist::Metadata::Dist::AUTHORITY = 'cpan:RWSTAUNER'; } # ABSTRACT: Base class for format-specific implementations use Carp qw(croak carp); # core use CPAN::DistnameInfo 0.12 (); use Path::Class 0.24 (); use Try::Tiny 0.09; sub new { my $class = shift; my $self = { @_ == 1 ? %{ $_[0] } : @_ }; bless $self, $class; my $req = $class->required_attribute; croak qq['$req' parameter required] if $req && !$self->{$req}; if ( exists $self->{file_spec} ) { # we just want the OS name ('Unix' or '') $self->{file_spec} =~ s/^File::Spec(::)?// if $self->{file_spec}; # blank is no good, use "Native" hack $self->{file_spec} = 'Native' if !$self->{file_spec}; } return $self; } sub default_file_spec { 'Native' } sub determine_name_and_version { my ($self) = @_; $self->set_name_and_version( $self->parse_name_and_version( $self->root ) ); return; } sub determine_packages { my ($self, @files) = @_; my $determined = try { my @dir_and_files = $self->physical_directory(@files); # return $self->packages_from_directory(@dir_and_files); } catch { carp("Error determining packages: $_[0]"); +{}; # return }; return $determined; } sub extract_into { my ($self, $dir, @files) = @_; @files = $self->list_files unless @files; require File::Basename; my @disk_files; foreach my $file (@files) { my $ff = $self->path_class_file->new_foreign( $self->file_spec, $file ); # Translate dist format (relative path) to disk/OS format and prepend $dir. # This dir_list + basename hack is probably ok because the paths in a dist # should always be relative (if there *was* a volume we wouldn't want it). my $path = $self->path_class_file ->new( $dir, $ff->dir->dir_list, $ff->basename ); $path->dir->mkpath(0, oct(700)); my $full_path = $path->stringify; open(my $fh, '>', $full_path) or croak "Failed to open '$full_path' for writing: $!"; print $fh $self->file_content($file); # do we really want full path or do we want relative? push(@disk_files, $full_path); } return (wantarray ? ($dir, @disk_files) : $dir); } sub file_content { croak q[Method 'file_content' not defined]; } sub file_checksum { my ($self, $file, $type) = @_; $type ||= 'md5'; require Digest; # core # md5 => MD5, sha256 => SHA-256 (my $impl = uc $type) =~ s/^(SHA|CRC)([0-9]+)$/$1-$2/; my $digest = Digest->new($impl); $digest->add( $self->file_content($file) ); return $digest->hexdigest; } sub find_files { croak q[Method 'find_files' not defined]; } sub file_spec { my ($self) = @_; $self->{file_spec} = $self->default_file_spec if !exists $self->{file_spec}; return $self->{file_spec}; } sub full_path { my ($self, $file) = @_; return $file unless my $root = $self->root; # don't re-add the root if it's already there return $file # FIXME: this regexp is probably not cross-platform... # FIXME: is there a way to do this with File::Spec? if $file =~ m@^\Q${root}\E[\\/]@; # FIXME: does this foreign_file work w/ Dir ? return $self->path_class_file ->new_foreign($self->file_spec, $root, $file)->stringify; } sub list_files { my ($self) = @_; $self->{_list_files} = do { my @files = sort $self->find_files; my ($root, @rel) = $self->remove_root_dir(@files); $self->{root} = $root; \@rel; # return } unless $self->{_list_files}; return @{ $self->{_list_files} }; } { no strict 'refs'; ## no critic (NoStrict) foreach my $method ( qw( name version ) ){ *$method = sub { my ($self) = @_; $self->determine_name_and_version if !exists $self->{ $method }; return $self->{ $method }; }; } } sub packages_from_directory { my ($self, $dir, @files) = @_; my @pvfd = ($dir); # M::M::p_v_f_d expects full paths for \@files push @pvfd, [map { $self->path_class_file->new($_)->is_absolute ? $_ : $self->path_class_file->new($dir, $_)->stringify } @files] if @files; require Module::Metadata; my $provides = try { my $packages = Module::Metadata->package_versions_from_directory(@pvfd); while ( my ($pack, $pv) = each %$packages ) { # M::M::p_v_f_d returns files in native OS format (obviously); # CPAN::Meta expects file paths in Unix format $pv->{file} = $self->path_class_file ->new($pv->{file})->as_foreign('Unix')->stringify; } $packages; # return } catch { carp("Failed to determine packages: $_[0]"); +{}; # return }; return $provides || {}; } sub parse_name_and_version { my ($self, $path) = @_; my ( $name, $version ); if ( $path ){ # try a simple regexp first $path =~ m! ([^\\/]+) # name (anything below final directory) - # separator (v?[0-9._]+) # version (?: # possible file extensions \.t(?:ar\.)?gz )? $ !x and ( $name, $version ) = ( $1, $2 ); # attempt to improve data with CPAN::DistnameInfo (but ignore any errors) # TODO: also grab maturity and cpanid ? # release_status = $dist->maturity eq 'released' ? 'stable' : 'unstable'; # -(TRIAL|RC) => 'testing', '_' => 'unstable' eval { # DistnameInfo expects any directories in unix format (thanks jeroenl) my $dnifile = $self->path_class_file ->new($path)->as_foreign('Unix')->stringify; # if it doesn't appear to have an extension fake one to help DistnameInfo $dnifile .= '.tar.gz' unless $dnifile =~ /\.[a-z]\w+$/; my $dni = CPAN::DistnameInfo->new($dnifile); my $dni_name = $dni->dist; my $dni_version = $dni->version; # if dni matched both name and version, or previous regexp didn't match if ( $dni_name && $dni_version || !$name ) { $name = $dni_name if $dni_name; $version = $dni_version if $dni_version; } }; warn $@ if $@; } return ($name, $version); } sub path_class_dir { $_[0]->{path_class_dir} ||= 'Path::Class::Dir' } sub path_class_file { $_[0]->{path_class_file} ||= 'Path::Class::File' } sub path_classify_dir { my ($self, $dir) = @_; $self->path_class_dir->new_foreign($self->file_spec, $dir) } sub path_classify_file { my ($self, $file) = @_; $self->path_class_file->new_foreign($self->file_spec, $file) } sub perl_files { return grep { /\.pm$/ } $_[0]->list_files; } sub physical_directory { my ($self, @files) = @_; require File::Temp; # dir will be removed when return value goes out of scope (in caller) my $dir = File::Temp->newdir(); return $self->extract_into($dir, @files); } sub remove_root_dir { my ($self, @files) = @_; return unless @files; # FIXME: can we use File::Spec for these regexp's instead of [\\/] ? # grab the root dir from the first file $files[0] =~ m{^([^\\/]+)[\\/]} # if not matched quit now or return (undef, @files); my $dir = $1; my @rel; # strip $dir from each file for (@files) { m{^\Q$dir\E[\\/](.+)$} # if the match failed they're not all under the same root so just return now or return (undef, @files); push @rel, $1; } return ($dir, @rel); } sub required_attribute { return } sub root { my ($self) = @_; # call list_files instead of find_files so that it caches the result $self->list_files unless exists $self->{root}; return $self->{root}; } sub set_name_and_version { my ($self, @values) = @_; my @fields = qw( name version ); foreach my $i ( 0 .. $#fields ){ $self->{ $fields[$i] } = $values[$i] if !exists $self->{ $fields[$i] } && defined $values[$i]; } return; } # version() defined with name() 1; __END__ =pod =encoding utf-8 =for :stopwords Randy Stauner ACKNOWLEDGEMENTS TODO dist dists dir unix checksum checksums =head1 NAME Dist::Metadata::Dist - Base class for format-specific implementations =head1 VERSION version 0.925 =head1 SYNOPSIS # don't use this, use a subclass =head1 DESCRIPTION This is a base class for different dist formats. The following methods B be defined by subclasses: =over 4 =item * L =item * L =back =head1 METHODS =head2 new Simple constructor that subclasses can inherit. Ensures the presence of L if defined by the subclass. =head2 default_file_spec Defaults to C<'Native'> in the base class which will let L determine the value. =head2 determine_name_and_version Some dist formats may define a way to determine the name and version. =head2 determine_packages $packages = $dist->determine_packages(@files); Search the specified files (or all files if unspecified) for perl packages. Extracts the files to a temporary directory if necessary and uses L to discover package names and versions. =head2 extract_into $ddir = $dist->extract_into($dir); ($ddir, @dfiles) = $dist->extract_into($dir, @files); Extracts the specified files (or all files if not specified) into the specified directory. In list context this returns a list of the directory (which may be a subdirectory of the C<$dir> passed in) and the files extracted (in native OS (on-disk) format). In scalar context just the directory is returned. =head2 file_content Returns the content for the specified file from the dist. This B be defined by subclasses. =head2 file_checksum $dist->file_checksum('lib/Mod/Name.pm', 'sha256'); Returns a checksum (hex digest) of the file content. The L module is used to generate the checksums. The value specified should be one accepted by C<< Digest->new >>. A small effort is made to translate simpler names like C into C and C into C (which are the names L expects). If the type of checksum is not specified C will be used. =head2 find_files Determine the files contained in the dist. This is called from L and cached on the object. This B be defined by subclasses. =head2 file_spec Returns the OS name of the L module used for this format. This is mostly so subclasses can define a specific one (as L) if necessary. A C attribute can be passed to the constructor to override the default. B: This is used for the internal format of the dist. Tar archives, for example, are always in unix format. For operations outside of the dist, the format determined by L will always be used. =head2 full_path $dist->full_path("lib/Mod.pm"); # "root-dir/lib/Mod.pm" Used internally to put the L directory back onto the file. =head2 list_files Returns a list of the files in the dist starting at the dist root. This calls L to get a listing of the contents of the dist, determines (and caches) the root directory (if any), caches and returns the the list of files with the root dir stripped. @files = $dist->list_files; # something like qw( README META.yml lib/Mod.pm ) =head2 name The dist name if it could be determined. =head2 packages_from_directory $provides = $dist->packages_from_directory($dir, @files); Determines the packages provided by the perl modules found in a directory. This is thin wrapper around L. It returns a hashref like L. B: C<$dir> must be a physical directory on the disk, therefore C<@files> (if specified) must be in native OS format. This function is called internally from L (which calls L (which calls L)) which manages these requirements. =head2 parse_name_and_version ($name, $version) = $dist->parse_name_and_version($path); Attempt to parse name and version from the provided string. This will work for dists named like "Dist-Name-1.0". =head2 path_class_dir Returns the class name used for L objects. =head2 path_class_file Returns the class name used for L objects. =head2 path_classify_dir This is a shortcut for returning an object representing the provided dir utilizing L and L. =head2 path_classify_file This is a shortcut for returning an object representing the provided file utilizing L and L. =head2 perl_files Returns the subset of L that look like perl files. Currently returns anything matching C B: This should probably be customizable. =head2 physical_directory $dir = $dist->physical_directory(); ($dir, @dir_files) = $dist->physical_directory(@files); Returns the path to a physical directory on the disk where the specified files (if any) can be found. For in-memory formats this will make a temporary directory and write the specified files (or all files) into it. The return value is the same as L: In scalar context the path to the directory is returned. In list context the (possibly adjusted) paths to any specified files are appended to the return value. =head2 remove_root_dir my ($dir, @rel) = $dm->remove_root_dir(@files); If all the C<@files> are beneath the same root directory (as is normally the case) this will strip the root directory off of each file and return a list of the root directory and the stripped files. If there is no root directory the first element of the list will be C. =head2 required_attribute A single attribute that is required by the class. Subclasses can define this to make L C if it isn't present. =head2 root Returns the root directory of the dist (if there is one). =head2 set_name_and_version This is a convenience method for setting the name and version if they haven't already been set. This is often called by L. =head2 version Returns the version if it could be determined from the dist. =head1 SEE ALSO =over 4 =item * L - for examining a tar file =item * L - for a directory already on the disk =item * L - for mocking up a dist with perl data structures =back =head1 AUTHOR Randy Stauner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Dist-Metadata-0.925/lib/Dist/Metadata/Archive.pm0000644000175000017500000000636112105062622020254 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: # # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package Dist::Metadata::Archive; { $Dist::Metadata::Archive::VERSION = '0.925'; } BEGIN { $Dist::Metadata::Archive::AUTHORITY = 'cpan:RWSTAUNER'; } # ABSTRACT: Base class for Dist::Metadata archive files use Carp (); # core use parent 'Dist::Metadata::Dist'; push(@Dist::Metadata::CARP_NOT, __PACKAGE__); sub new { my $class = shift; my $self = $class->SUPER::new(@_); if( $class eq __PACKAGE__ ){ my $subclass = 'Dist::Metadata::' . ( $self->{file} =~ /\.zip$/ ? 'Zip' : 'Tar' ); eval "require $subclass" or Carp::croak $@; # rebless into format specific subclass bless $self, $subclass; } return $self; } sub required_attribute { 'file' } sub archive { my ($self) = @_; return $self->{archive} ||= do { my $file = $self->file; Carp::croak "File '$file' does not exist" unless -e $file; $self->read_archive($file); # return }; } sub default_file_spec { 'Unix' } sub determine_name_and_version { my ($self) = @_; $self->set_name_and_version( $self->parse_name_and_version( $self->file ) ); return $self->SUPER::determine_name_and_version(@_); } sub file { return $_[0]->{file}; } sub read_archive { Carp::croak q[Method 'read_archive' not defined]; } 1; __END__ =pod =encoding utf-8 =for :stopwords Randy Stauner ACKNOWLEDGEMENTS TODO dist dists dir unix checksum checksums =head1 NAME Dist::Metadata::Archive - Base class for Dist::Metadata archive files =head1 VERSION version 0.925 =head1 SYNOPSIS my $dist = Dist::Metadata->new(file => $path_to_archive); =head1 DESCRIPTION This is a subclass of L to enable determining the metadata from an archive file. It is a base class for archive file formats: =over 4 =item * L =item * L =back It's not useful on it's own and should be used from L. =head1 METHODS =head2 new $dist = Dist::Metadata::Archive->new(file => $path); Accepts a single C argument that should be a path to a file. If called from this base class C will delegate to a subclass based on the filename and return a blessed instance of that subclass. =head2 archive Returns an object representing the archive file. =head2 default_file_spec Returns C since most archive files are be in unix format. =head2 determine_name_and_version Attempts to parse name and version from file name. =head2 file The C attribute passed to the constructor, used to load L. =head2 read_archive $dist->read_archive($file); Returns a format-specific object representing the specified file. This B be defined by subclasses. =for test_synopsis my $path_to_archive; =head1 AUTHOR Randy Stauner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Dist-Metadata-0.925/lib/Dist/Metadata/Zip.pm0000644000175000017500000000407012105062622017430 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: # # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package Dist::Metadata::Zip; { $Dist::Metadata::Zip::VERSION = '0.925'; } BEGIN { $Dist::Metadata::Zip::AUTHORITY = 'cpan:RWSTAUNER'; } # ABSTRACT: Enable Dist::Metadata for zip files use Archive::Zip 1.30 (); use Carp (); # core use parent 'Dist::Metadata::Archive'; push(@Dist::Metadata::CARP_NOT, __PACKAGE__); sub file_content { my ($self, $file) = @_; my ($content, $status) = $self->archive->contents( $self->full_path($file) ); Carp::croak "Failed to get content of '$file' from archive" if $status != Archive::Zip::AZ_OK(); return $content; } sub find_files { my ($self) = @_; return map { $_->fileName } grep { !$_->isDirectory } $self->archive->members; } sub read_archive { my ($self, $file) = @_; my $archive = Archive::Zip->new(); $archive->read($file) == Archive::Zip::AZ_OK() or Carp::croak "Failed to read zip file!"; return $archive; } 1; __END__ =pod =encoding utf-8 =for :stopwords Randy Stauner ACKNOWLEDGEMENTS TODO dist dists dir unix checksum checksums =head1 NAME Dist::Metadata::Zip - Enable Dist::Metadata for zip files =head1 VERSION version 0.925 =head1 SYNOPSIS my $dist = Dist::Metadata->new(file => $path_to_archive); =head1 DESCRIPTION This is a subclass of L (actually of L) to enable determining the metadata from a zip file. It's probably not very useful on it's own and should be used from L. =for test_synopsis my $path_to_archive; =head1 AUTHOR Randy Stauner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Dist-Metadata-0.925/lib/Dist/Metadata/Tar.pm0000644000175000017500000000406612105062622017421 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: # # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package Dist::Metadata::Tar; { $Dist::Metadata::Tar::VERSION = '0.925'; } BEGIN { $Dist::Metadata::Tar::AUTHORITY = 'cpan:RWSTAUNER'; } # ABSTRACT: Enable Dist::Metadata for tar files use Archive::Tar 1 (); # 0.07 isn't good enough use Carp (); # core use parent 'Dist::Metadata::Archive'; push(@Dist::Metadata::CARP_NOT, __PACKAGE__); sub file_content { my ( $self, $file ) = @_; return $self->archive->get_content( $self->full_path($file) ); } sub find_files { my ($self) = @_; return map { $_->full_path } grep { $_->is_file } $self->archive->get_files; } sub read_archive { my ($self, $file) = @_; my $archive = Archive::Tar->new(); $archive->read($file); return $archive; } sub tar { warn __PACKAGE__ . '::tar() is deprecated. Use archive() instead.'; return $_[0]->archive; } 1; __END__ =pod =encoding utf-8 =for :stopwords Randy Stauner ACKNOWLEDGEMENTS TODO dist dists dir unix checksum checksums =head1 NAME Dist::Metadata::Tar - Enable Dist::Metadata for tar files =head1 VERSION version 0.925 =head1 SYNOPSIS my $dist = Dist::Metadata->new(file => $path_to_archive); =head1 DESCRIPTION This is a subclass of L (actually of L) to enable determining the metadata from a tar file. This is probably the most useful subclass. It's probably not very useful on it's own though, and should be used from L. =for Pod::Coverage tar =for test_synopsis my $path_to_archive; =head1 AUTHOR Randy Stauner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Dist-Metadata-0.925/lib/Dist/Metadata.pm0000644000175000017500000003746212105062622016701 0ustar randorando# vim: set ts=2 sts=2 sw=2 expandtab smarttab: # # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # use strict; use warnings; package Dist::Metadata; { $Dist::Metadata::VERSION = '0.925'; } # git description: v0.924-1-g6701fe0 BEGIN { $Dist::Metadata::AUTHORITY = 'cpan:RWSTAUNER'; } # ABSTRACT: Information about a perl module distribution use Carp qw(croak carp); use CPAN::Meta 2.1 (); use List::Util qw(first); # core in perl v5.7.3 # something that is obviously not a real value use constant UNKNOWN => '- unknown -'; sub new { my $class = shift; my $self = { determine_packages => 1, @_ == 1 ? %{ $_[0] } : @_ }; my @formats = qw( dist file dir struct ); croak(qq[A dist must be specified (one of ] . join(', ', map { "'$_'" } @formats) . ')') unless first { $self->{$_} } @formats; bless $self, $class; } sub dist { my ($self) = @_; return $self->{dist} ||= do { my $dist; if( my $struct = $self->{struct} ){ require Dist::Metadata::Struct; $dist = Dist::Metadata::Struct->new(%$struct); } elsif( my $dir = $self->{dir} ){ require Dist::Metadata::Dir; $dist = Dist::Metadata::Dir->new(dir => $dir); } elsif ( my $file = $self->{file} ){ require Dist::Metadata::Archive; $dist = Dist::Metadata::Archive->new(file => $file); } else { # new() checks for one and dies without so we shouldn't get here croak q[No dist format parameters found!]; } $dist; # return }; } sub default_metadata { my ($self) = @_; return { # required abstract => UNKNOWN, author => [], dynamic_config => 0, generated_by => ( ref($self) || $self ) . ' version ' . ( $self->VERSION || 0 ), license => ['unknown'], # this 'unknown' comes from CPAN::Meta::Spec 'meta-spec' => { version => '2', url => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec', }, name => UNKNOWN, # strictly speaking, release_status is also required but # CPAN::Meta will figure it out based on the version number. if # we were to set it explicitly, then we would first need to # examine the version number for '_' or 'TRIAL' or 'RC' etc. version => 0, # optional no_index => { # ignore test and build directories by default directory => [qw( inc t xt )], }, # provides => { package => { file => $file, version => $version } } }; } sub determine_metadata { my ($self) = @_; my $dist = $self->dist; my $meta = $self->default_metadata; # get name and version from dist if dist was able to parse them foreach my $att (qw(name version)) { my $val = $dist->$att; # if the dist could determine it that's better than the default # but undef won't validate. value in $self will still override. $meta->{$att} = $val if defined $val; } # any passed in values should take priority foreach my $field ( keys %$meta ){ $meta->{$field} = $self->{$field} if exists $self->{$field}; } return $meta; } sub determine_packages { # meta must be passed to avoid infinite loop my ( $self, $meta ) = @_; # if not passed in, use defaults (we just want the 'no_index' property) $meta ||= $self->meta_from_struct( $self->determine_metadata ); # should_index_file() expects unix paths my @files = grep { $meta->should_index_file( $self->dist->path_classify_file($_)->as_foreign('Unix')->stringify ); } $self->dist->perl_files; # TODO: should we limit packages to lib/ if it exists? # my @lib = grep { m#^lib/# } @files; @files = @lib if @lib; return {} if not @files; my $packages = $self->dist->determine_packages(@files); foreach my $pack ( keys %$packages ) { # Remove any packages that should not be indexed if ( !$meta->should_index_package($pack) ) { delete $packages->{$pack}; next; } unless( $self->{include_inner_packages} ){ # PAUSE only considers packages that match the basename of the # containing file. For example, file Foo.pm may only contain a # package that matches /\bFoo$/. This is what PAUSE calls a # "simile". All other packages in the file will be ignored. # capture file basename (without the extension) my ($base) = ($packages->{$pack}->{file} =~ m!([^/]+)\.pm(?:\.PL)?$!); # remove if file didn't match regexp or package doesn't match basename delete $packages->{$pack} if !$base || $pack !~ m{\b\Q$base\E$}; } } return $packages; } sub load_meta { my ($self) = @_; my $dist = $self->dist; my @files = $dist->list_files; my ( $meta, $metafile ); my $default_meta = $self->determine_metadata; # prefer json file (spec v2) if ( $metafile = first { m#^META\.json$# } @files ) { $meta = CPAN::Meta->load_json_string( $dist->file_content($metafile) ); } # fall back to yaml file (spec v1) elsif ( $metafile = first { m#^META\.ya?ml$# } @files ) { $meta = CPAN::Meta->load_yaml_string( $dist->file_content($metafile) ); } # no META file found in dist else { $meta = $self->meta_from_struct( $default_meta ); } { # always inlude (never index) the default no_index dirs my $dir = ($meta->{no_index} ||= {})->{directory} ||= []; my %seen = map { ($_ => 1) } @$dir; unshift @$dir, grep { !$seen{$_}++ } @{ $default_meta->{no_index}->{directory} }; } # Something has to be indexed, so if META has no (or empty) 'provides' # attempt to determine packages unless specifically configured not to if ( !keys %{ $meta->provides || {} } && $self->{determine_packages} ) { # respect api/encapsulation my $struct = $meta->as_struct; $struct->{provides} = $self->determine_packages($meta); $meta = $self->meta_from_struct($struct); } return $meta; } sub meta { my ($self) = @_; return $self->{meta} ||= $self->load_meta; } sub meta_from_struct { my ($self, $struct) = @_; return CPAN::Meta->create( $struct, { lazy_validation => 1 } ); } sub package_versions { my ($self) = shift; my $provides = @_ ? shift : $self->provides; # || {} return { map { ($_ => $provides->{$_}{version}) } keys %$provides }; } sub module_info { my ($self, $opts) = @_; my $provides = $opts->{provides} || $self->provides; $provides = { %$provides }; # break reference my $checksums = $opts->{checksum} || $opts->{digest} || []; $checksums = [ $checksums ] unless ref($checksums) eq 'ARRAY'; my $digest_cache = {}; foreach my $mod ( keys %$provides ){ my $data = { %{ $provides->{ $mod } } }; # break reference foreach my $checksum ( @$checksums ){ $data->{ $checksum } = $digest_cache->{ $data->{file} }->{ $checksum } ||= $self->dist->file_checksum($data->{file}, $checksum); } # TODO: $opts->{callback}->($self, $mod, $data, sub { $self->dist->file_content($data->{file}) }); $provides->{ $mod } = $data; } return $provides; } { no strict 'refs'; ## no critic (NoStrict) foreach my $method ( qw( name provides version ) ){ *$method = sub { $_[0]->meta->$method }; } } 1; __END__ =pod =encoding utf-8 =for :stopwords Randy Stauner ACKNOWLEDGEMENTS TODO dist dists dir unix checksum checksums cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 NAME Dist::Metadata - Information about a perl module distribution =head1 VERSION version 0.925 =head1 SYNOPSIS my $dist = Dist::Metadata->new(file => $path_to_archive); my $description = sprintf "Dist %s (%s)", $dist->name, $dist->version; my $provides = $dist->package_versions; while( my ($package, $version) = each %$provides ){ print "$description includes $package $version\n"; } =head1 DESCRIPTION This module provides an easy interface for getting various metadata about a Perl module distribution. It takes care of the common logic of: =over 4 =item * reading a tar file (L) =item * finding and reading the correct META file if the distribution contains one (L) =item * and determining some of the metadata if there is no META file (L, L) =back This is mostly a wrapper around L providing an easy interface to find and load the meta file from a F file. A dist can also be represented by a directory or merely a structure of data. If the dist does not contain a meta file the module will attempt to determine some of that data from the dist. B: This interface is still being defined. Please submit any suggestions or concerns. =head1 METHODS =head2 new Dist::Metadata->new(file => $path); A dist can be represented by a tar file, a directory, or a data structure. The format will be determined by the presence of the following options (checked in this order): =over 4 =item * C - hash of data to build a mock dist; See L. =item * C - path to the root directory of a dist =item * C - the path to a F<.tar.gz> file =back You can also slyly pass in your own object as a C parameter in which case this module will just use that. This can be useful if you need to use your own subclass (perhaps while developing a new format). Other options that can be specified: =over 4 =item * C - dist name =item * C - dist version =item * C - boolean to indicate whether dist should be searched for packages if no META file is found. Defaults to true. =item * C - When determining provided packages the default behavior is to only include packages that match the name of the file that defines them (like C matches C<*/Bar.pm>). This way only modules that can be loaded (via C or C) will be returned (and "inner" packages will be ignored). This mimics the behavior of PAUSE. Set this to true to include any "inner" packages provided by the dist (that are not otherwise excluded by another mechanism (such as C)). =back =head2 dist Returns the dist object (subclass of L). =head2 default_metadata Returns a hashref of default values used to initialize a L object when a META file is not found. Called from L. =head2 determine_metadata Examine the dist and try to determine metadata. Returns a hashref which can be passed to L. This is used when the dist does not contain a META file. =head2 determine_packages my $provides = $dm->determine_packages($meta); Attempt to determine packages provided by the dist. This is used when the META file does not include a C section and C is not set to false in the constructor. If a L object is not provided a default one will be used. Files contained in the dist and packages found therein will be checked against the meta object's C attribute (see L and L). By default this ignores any files found in F, F, or F directories. =head2 load_meta Loads the metadata from the L. =head2 meta Returns the L instance in use. =head2 meta_from_struct $meta = $dm->meta_from_struct(\%struct); Passes the the provided C<\%struct> to L and returns the result. =head2 package_versions $pv = $dm->package_versions(); # { 'Package::Name' => '1.0', 'Module::2' => '2.1' } Returns a simplified version of C: a hashref with package names as keys and versions as values. This can also be called as a class method which will operate on a passed in hashref. $pv = Dist::Metadata->package_versions(\%provides); =head2 module_info Returns a hashref of meta data for each of the packages provided by this dist. The hashref starts with the same data as L but additional data can be added to the output by specifying options in a hashref: =over 4 =item C Use the specified algorithm to compute a hex digest of the file. The type you specify will be the key in the returned hashref. You can use an arrayref to specify more than one type. $dm->module_info({checksum => ['sha256', 'md5']}); # returns: { 'Mod::Name' => { file => 'lib/Mod/Name.pm', version => '0.1', md5 => '258e88dcbd3cd44d8e7ab43f6ecb6af0', sha256 => 'f22136124cd3e1d65a48487cecf310771b2fd1e83dc032e3d19724160ac0ff71', }, } See L for more information. =item C The default is to start with the hashref returned from L but you can pass in an alternate hashref using this key. =back Other options may be added in the future. =head1 INHERITED METHODS The following methods are available on this object and simply call the corresponding method on the L object. =over 4 =item * X name =item * X provides =item * X version =back =for Pod::Coverage name version provides =for test_synopsis my $path_to_archive; =head1 TODO =over 4 =item * More tests =item * C option (to allow setting it to false) =item * Guess main module from dist name if no packages can be found =item * Determine abstract? =item * Add change log info (L)? =item * Subclass as C just so that it has C in the name? =item * Use L? =back =head1 SEE ALSO =head2 Dependencies =over 4 =item * L =item * L =item * L =back =head2 Related Modules =over 4 =item * L =item * L =back =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc Dist::Metadata =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * Search CPAN The default CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. L =item * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code L git clone https://github.com/rwstauner/Dist-Metadata.git =head1 AUTHOR Randy Stauner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Dist-Metadata-0.925/MANIFEST0000644000175000017500000000577212105062622014302 0ustar randorandoChanges LICENSE MANIFEST MANIFEST.SKIP META.json META.yml Makefile.PL README corpus/Dist-Metadata-Test-LikePause-0.1.tar.gz corpus/Dist-Metadata-Test-LikePause-0.1.zip corpus/Dist-Metadata-Test-LikePause-0.1/README corpus/Dist-Metadata-Test-LikePause-0.1/lib/Dist/Metadata/Test/LikePause.pm corpus/Dist-Metadata-Test-MetaFile-2.2.tar.gz corpus/Dist-Metadata-Test-MetaFile-2.2.zip corpus/Dist-Metadata-Test-MetaFile-2.2/META.json corpus/Dist-Metadata-Test-MetaFile-2.2/META.yml corpus/Dist-Metadata-Test-MetaFile-2.2/README corpus/Dist-Metadata-Test-MetaFile-2.2/lib/Dist/Metadata/Test/MetaFile.pm corpus/Dist-Metadata-Test-MetaFile-2.2/lib/Dist/Metadata/Test/MetaFile/PM.pm corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1.tar.gz corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1.zip corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.json corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.yml corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/README corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/inc/NotThis.pm corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/MetaFile/Incomplete.pm corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/t/lib/Never.pm corpus/Dist-Metadata-Test-NoMetaFile-0.1.tar.gz corpus/Dist-Metadata-Test-NoMetaFile-0.1.zip corpus/Dist-Metadata-Test-NoMetaFile-0.1/README corpus/Dist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile.pm corpus/Dist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile/PM.pm corpus/Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1.tar.gz corpus/Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1.zip corpus/Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1/README corpus/Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1/lib/Dist/Metadata/Test/NoMetaFile/DevRelease.pm corpus/Dist-Metadata-Test-SubDir-1.5.tar.gz corpus/Dist-Metadata-Test-SubDir-1.5.zip corpus/make_dists corpus/noroot.tar.gz corpus/noroot.zip corpus/noroot/README corpus/noroot/lib/Dist/Metadata/Test/NoRoot.pm corpus/noroot/lib/Dist/Metadata/Test/NoRoot/PM.pm corpus/structs.pl corpus/subdir/Dist-Metadata-Test-SubDir-1.5/README corpus/subdir/Dist-Metadata-Test-SubDir-1.5/lib/Dist/Metadata/Test/SubDir.pm corpus/subdir/Dist-Metadata-Test-SubDir-1.5/lib/Dist/Metadata/Test/SubDir/PM.pm dist.ini lib/Dist/Metadata.pm lib/Dist/Metadata/Archive.pm lib/Dist/Metadata/Dir.pm lib/Dist/Metadata/Dist.pm lib/Dist/Metadata/Struct.pm lib/Dist/Metadata/Tar.pm lib/Dist/Metadata/Zip.pm t/00-compile.t t/00-report-prereqs.t t/archive.t t/determine.t t/dir.t t/dists.t t/file_spec.t t/load_meta.t t/module_info.t t/no_index.t t/package_versions.t t/struct.t t/tar.t t/zip.t xt/author/critic.t xt/author/pod-spell.t xt/author/test-eol.t xt/release/changes_has_content.t xt/release/cpan-changes.t xt/release/dist-manifest.t xt/release/distmeta.t xt/release/kwalitee.t xt/release/meta-json.t xt/release/minimum-version.t xt/release/mojibake.t xt/release/no-tabs.t xt/release/pod-coverage.t xt/release/pod-linkcheck.t xt/release/pod-syntax.t xt/release/synopsis.t xt/release/test-version.t xt/release/unused-vars.t Dist-Metadata-0.925/META.json0000644000175000017500000003742112105062622014566 0ustar randorando{ "abstract" : "Information about a perl module distribution", "author" : [ "Randy Stauner " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300030, CPAN::Meta::Converter version 2.120921", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Metadata", "no_index" : { "directory" : [ "corpus", "examples", "inc", "share", "t", "xt" ], "namespace" : [ "Local", "t::lib" ], "package" : [ "DB" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Meta" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Archive::Tar" : "1", "Archive::Zip" : "1.30", "CPAN::DistnameInfo" : "0.12", "CPAN::Meta" : "2.1", "Carp" : "0", "Digest" : "1.03", "Digest::MD5" : "2", "Digest::SHA" : "5", "File::Basename" : "0", "File::Find" : "0", "File::Spec::Native" : "1.002", "File::Temp" : "0.19", "List::Util" : "0", "Module::Metadata" : "0", "Path::Class" : "0.24", "Try::Tiny" : "0.09", "constant" : "0", "parent" : "0", "perl" : "5.006", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "File::Spec::Functions" : "0", "Test::Fatal" : "0", "Test::MockObject" : "1.09", "Test::More" : "0.96" } } }, "provides" : { "Dist::Metadata" : { "file" : "lib/Dist/Metadata.pm", "version" : "0.925" }, "Dist::Metadata::Archive" : { "file" : "lib/Dist/Metadata/Archive.pm", "version" : "0.925" }, "Dist::Metadata::Dir" : { "file" : "lib/Dist/Metadata/Dir.pm", "version" : "0.925" }, "Dist::Metadata::Dist" : { "file" : "lib/Dist/Metadata/Dist.pm", "version" : "0.925" }, "Dist::Metadata::Struct" : { "file" : "lib/Dist/Metadata/Struct.pm", "version" : "0.925" }, "Dist::Metadata::Tar" : { "file" : "lib/Dist/Metadata/Tar.pm", "version" : "0.925" }, "Dist::Metadata::Zip" : { "file" : "lib/Dist/Metadata/Zip.pm", "version" : "0.925" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-dist-metadata at rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Metadata" }, "homepage" : "https://github.com/rwstauner/Dist-Metadata", "repository" : { "type" : "git", "url" : "https://github.com/rwstauner/Dist-Metadata.git", "web" : "https://github.com/rwstauner/Dist-Metadata" } }, "version" : "0.925", "x_Dist_Zilla" : { "perl" : { "version" : "5.014002" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@Author::RWSTAUNER/Git::NextVersion", "version" : "2.008" }, { "class" : "Dist::Zilla::Plugin::GenerateFile", "name" : "@Author::RWSTAUNER/GenerateManifestSkip", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::GatherDir", "name" : "@Author::RWSTAUNER/GatherDir", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::RWSTAUNER/PruneCruft", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::RWSTAUNER/ManifestSkip", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::PruneFiles", "name" : "@Author::RWSTAUNER/PruneDevelCoverDatabase", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::PruneFiles", "name" : "@Author::RWSTAUNER/PruneCodeStatCollection", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::PruneFiles", "name" : "@Author::RWSTAUNER/PruneTags", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::RWSTAUNER/Authority", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::RWSTAUNER/NextRelease", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::RWSTAUNER/Git::Describe", "version" : "0.002" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Author::RWSTAUNER/PkgVersion", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Prepender", "name" : "@Author::RWSTAUNER/Prepender", "version" : "1.112280" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "name" : "@Author::RWSTAUNER/PodWeaver", "version" : "3.101641" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::RWSTAUNER/License", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::RWSTAUNER/Readme", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "name" : "@Author::RWSTAUNER/ReadmeAnyFromPod", "version" : "0.120120" }, { "class" : "Dist::Zilla::Plugin::Bugtracker", "name" : "@Author::RWSTAUNER/Bugtracker", "version" : "1.111080" }, { "class" : "Dist::Zilla::Plugin::Repository", "name" : "@Author::RWSTAUNER/Repository", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::RWSTAUNER/GithubMeta", "version" : "0.28" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::RWSTAUNER/AutoPrereqs", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::RWSTAUNER/MetaNoIndex", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "name" : "@Author::RWSTAUNER/MetaProvides::Package", "version" : "1.14000001" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::RWSTAUNER/MinimumPerl", "version" : "1.003" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::RWSTAUNER/MetaConfig", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::RWSTAUNER/MetaYAML", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::RWSTAUNER/MetaJSON", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::RWSTAUNER/ExecDir", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::RWSTAUNER/ShareDir", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "name" : "@Author::RWSTAUNER/MakeMaker", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::RWSTAUNER/Test::ChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "name" : "@Author::RWSTAUNER/Test::PodSpelling", "version" : "2.002006" }, { "class" : "Dist::Zilla::Plugin::Test::UnusedVars", "name" : "@Author::RWSTAUNER/@TestingMania/Test::UnusedVars", "version" : "2.000003" }, { "class" : "Dist::Zilla::Plugin::Test::Synopsis", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Synopsis", "version" : "2.000002" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Version", "version" : "0.002004" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::RWSTAUNER/@TestingMania/PodCoverageTests", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Test::Perl::Critic", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Perl::Critic", "version" : "2.112410" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Author::RWSTAUNER/@TestingMania/Test::CPAN::Changes", "version" : "0.005" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Meta::JSON", "name" : "@Author::RWSTAUNER/@TestingMania/Test::CPAN::Meta::JSON", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::Test::DistManifest", "name" : "@Author::RWSTAUNER/@TestingMania/Test::DistManifest", "version" : "2.000002" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::RWSTAUNER/@TestingMania/MetaTests", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Compile", "version" : "1.112820" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Kwalitee", "version" : "2.03" }, { "class" : "Dist::Zilla::Plugin::NoTabsTests", "name" : "@Author::RWSTAUNER/@TestingMania/NoTabsTests", "version" : "0.01" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "name" : "@Author::RWSTAUNER/@TestingMania/Test::MinimumVersion", "version" : "2.000002" }, { "class" : "Dist::Zilla::Plugin::Test::Pod::LinkCheck", "name" : "@Author::RWSTAUNER/@TestingMania/Test::Pod::LinkCheck", "version" : "1.001" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "name" : "@Author::RWSTAUNER/@TestingMania/Test::EOL", "version" : "0.07" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::RWSTAUNER/@TestingMania/PodSyntaxTests", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::RWSTAUNER/@TestingMania/MojibakeTests", "version" : "0.5" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::RWSTAUNER/Manifest", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::CheckExtraTests", "name" : "@Author::RWSTAUNER/CheckExtraTests", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@Author::RWSTAUNER/CheckChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::RWSTAUNER/CheckPrereqsIndexed", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::RWSTAUNER/TestRelease", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Author::RWSTAUNER/@Git/Check", "version" : "2.008" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@Author::RWSTAUNER/@Git/Commit", "version" : "2.008" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Author::RWSTAUNER/@Git/Tag", "version" : "2.008" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@Author::RWSTAUNER/@Git/Push", "version" : "2.008" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::RWSTAUNER/ConfirmRelease", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::RWSTAUNER/UploadToCPAN", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "@Author::RWSTAUNER/InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::Run::BeforeBuild", "name" : "Run::BeforeBuild", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "Test::ReportPrereqs", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "4.300030" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "4.300030" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "4.300030" } }, "x_authority" : "cpan:RWSTAUNER" } Dist-Metadata-0.925/MANIFEST.SKIP0000644000175000017500000000013212105062622015030 0ustar randorando \B\.git\b \B\.gitignore$ ^[\._]build ^blib/ ^(Build|Makefile)$ \bpm_to_blib$ ^MYMETA\. Dist-Metadata-0.925/LICENSE0000644000175000017500000004365612105062622014161 0ustar randorandoThis software is copyright (c) 2011 by Randy Stauner. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2011 by Randy Stauner. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2011 by Randy Stauner. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Dist-Metadata-0.925/META.yml0000644000175000017500000002506312105062622014415 0ustar randorando--- abstract: 'Information about a perl module distribution' author: - 'Randy Stauner ' build_requires: ExtUtils::MakeMaker: 0 File::Spec: 0 File::Spec::Functions: 0 Test::Fatal: 0 Test::MockObject: 1.09 Test::More: 0.96 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300030, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Dist-Metadata no_index: directory: - corpus - examples - inc - share - t - xt namespace: - Local - t::lib package: - DB provides: Dist::Metadata: file: lib/Dist/Metadata.pm version: 0.925 Dist::Metadata::Archive: file: lib/Dist/Metadata/Archive.pm version: 0.925 Dist::Metadata::Dir: file: lib/Dist/Metadata/Dir.pm version: 0.925 Dist::Metadata::Dist: file: lib/Dist/Metadata/Dist.pm version: 0.925 Dist::Metadata::Struct: file: lib/Dist/Metadata/Struct.pm version: 0.925 Dist::Metadata::Tar: file: lib/Dist/Metadata/Tar.pm version: 0.925 Dist::Metadata::Zip: file: lib/Dist/Metadata/Zip.pm version: 0.925 requires: Archive::Tar: 1 Archive::Zip: 1.30 CPAN::DistnameInfo: 0.12 CPAN::Meta: 2.1 Carp: 0 Digest: 1.03 Digest::MD5: 2 Digest::SHA: 5 File::Basename: 0 File::Find: 0 File::Spec::Native: 1.002 File::Temp: 0.19 List::Util: 0 Module::Metadata: 0 Path::Class: 0.24 Try::Tiny: 0.09 constant: 0 parent: 0 perl: 5.006 strict: 0 warnings: 0 resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Metadata homepage: https://github.com/rwstauner/Dist-Metadata repository: https://github.com/rwstauner/Dist-Metadata.git version: 0.925 x_Dist_Zilla: perl: version: 5.014002 plugins: - class: Dist::Zilla::Plugin::Git::NextVersion name: '@Author::RWSTAUNER/Git::NextVersion' version: 2.008 - class: Dist::Zilla::Plugin::GenerateFile name: '@Author::RWSTAUNER/GenerateManifestSkip' version: 4.300030 - class: Dist::Zilla::Plugin::GatherDir name: '@Author::RWSTAUNER/GatherDir' version: 4.300030 - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::RWSTAUNER/PruneCruft' version: 4.300030 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::RWSTAUNER/ManifestSkip' version: 4.300030 - class: Dist::Zilla::Plugin::PruneFiles name: '@Author::RWSTAUNER/PruneDevelCoverDatabase' version: 4.300030 - class: Dist::Zilla::Plugin::PruneFiles name: '@Author::RWSTAUNER/PruneCodeStatCollection' version: 4.300030 - class: Dist::Zilla::Plugin::PruneFiles name: '@Author::RWSTAUNER/PruneTags' version: 4.300030 - class: Dist::Zilla::Plugin::Authority name: '@Author::RWSTAUNER/Authority' version: 1.006 - class: Dist::Zilla::Plugin::NextRelease name: '@Author::RWSTAUNER/NextRelease' version: 4.300030 - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::RWSTAUNER/Git::Describe' version: 0.002 - class: Dist::Zilla::Plugin::PkgVersion name: '@Author::RWSTAUNER/PkgVersion' version: 4.300030 - class: Dist::Zilla::Plugin::Prepender name: '@Author::RWSTAUNER/Prepender' version: 1.112280 - class: Dist::Zilla::Plugin::PodWeaver name: '@Author::RWSTAUNER/PodWeaver' version: 3.101641 - class: Dist::Zilla::Plugin::License name: '@Author::RWSTAUNER/License' version: 4.300030 - class: Dist::Zilla::Plugin::Readme name: '@Author::RWSTAUNER/Readme' version: 4.300030 - class: Dist::Zilla::Plugin::ReadmeAnyFromPod name: '@Author::RWSTAUNER/ReadmeAnyFromPod' version: 0.120120 - class: Dist::Zilla::Plugin::Bugtracker name: '@Author::RWSTAUNER/Bugtracker' version: 1.111080 - class: Dist::Zilla::Plugin::Repository name: '@Author::RWSTAUNER/Repository' version: 0.19 - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::RWSTAUNER/GithubMeta' version: 0.28 - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::RWSTAUNER/AutoPrereqs' version: 4.300030 - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::RWSTAUNER/MetaNoIndex' version: 4.300030 - class: Dist::Zilla::Plugin::MetaProvides::Package name: '@Author::RWSTAUNER/MetaProvides::Package' version: 1.14000001 - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::RWSTAUNER/MinimumPerl' version: 1.003 - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::RWSTAUNER/MetaConfig' version: 4.300030 - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::RWSTAUNER/MetaYAML' version: 4.300030 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::RWSTAUNER/MetaJSON' version: 4.300030 - class: Dist::Zilla::Plugin::ExecDir name: '@Author::RWSTAUNER/ExecDir' version: 4.300030 - class: Dist::Zilla::Plugin::ShareDir name: '@Author::RWSTAUNER/ShareDir' version: 4.300030 - class: Dist::Zilla::Plugin::MakeMaker name: '@Author::RWSTAUNER/MakeMaker' version: 4.300030 - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::RWSTAUNER/Test::ChangesHasContent' version: 0.006 - class: Dist::Zilla::Plugin::Test::PodSpelling name: '@Author::RWSTAUNER/Test::PodSpelling' version: 2.002006 - class: Dist::Zilla::Plugin::Test::UnusedVars name: '@Author::RWSTAUNER/@TestingMania/Test::UnusedVars' version: 2.000003 - class: Dist::Zilla::Plugin::Test::Synopsis name: '@Author::RWSTAUNER/@TestingMania/Test::Synopsis' version: 2.000002 - class: Dist::Zilla::Plugin::Test::Version name: '@Author::RWSTAUNER/@TestingMania/Test::Version' version: 0.002004 - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::RWSTAUNER/@TestingMania/PodCoverageTests' version: 4.300030 - class: Dist::Zilla::Plugin::Test::Perl::Critic name: '@Author::RWSTAUNER/@TestingMania/Test::Perl::Critic' version: 2.112410 - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Author::RWSTAUNER/@TestingMania/Test::CPAN::Changes' version: 0.005 - class: Dist::Zilla::Plugin::Test::CPAN::Meta::JSON name: '@Author::RWSTAUNER/@TestingMania/Test::CPAN::Meta::JSON' version: 0.003 - class: Dist::Zilla::Plugin::Test::DistManifest name: '@Author::RWSTAUNER/@TestingMania/Test::DistManifest' version: 2.000002 - class: Dist::Zilla::Plugin::MetaTests name: '@Author::RWSTAUNER/@TestingMania/MetaTests' version: 4.300030 - class: Dist::Zilla::Plugin::Test::Compile name: '@Author::RWSTAUNER/@TestingMania/Test::Compile' version: 1.112820 - class: Dist::Zilla::Plugin::Test::Kwalitee name: '@Author::RWSTAUNER/@TestingMania/Test::Kwalitee' version: 2.03 - class: Dist::Zilla::Plugin::NoTabsTests name: '@Author::RWSTAUNER/@TestingMania/NoTabsTests' version: 0.01 - class: Dist::Zilla::Plugin::Test::MinimumVersion name: '@Author::RWSTAUNER/@TestingMania/Test::MinimumVersion' version: 2.000002 - class: Dist::Zilla::Plugin::Test::Pod::LinkCheck name: '@Author::RWSTAUNER/@TestingMania/Test::Pod::LinkCheck' version: 1.001 - class: Dist::Zilla::Plugin::Test::EOL name: '@Author::RWSTAUNER/@TestingMania/Test::EOL' version: 0.07 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::RWSTAUNER/@TestingMania/PodSyntaxTests' version: 4.300030 - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::RWSTAUNER/@TestingMania/MojibakeTests' version: 0.5 - class: Dist::Zilla::Plugin::Manifest name: '@Author::RWSTAUNER/Manifest' version: 4.300030 - class: Dist::Zilla::Plugin::CheckExtraTests name: '@Author::RWSTAUNER/CheckExtraTests' version: 0.009 - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@Author::RWSTAUNER/CheckChangesHasContent' version: 0.006 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::RWSTAUNER/CheckPrereqsIndexed' version: 0.008 - class: Dist::Zilla::Plugin::TestRelease name: '@Author::RWSTAUNER/TestRelease' version: 4.300030 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::RWSTAUNER/@Git/Check' version: 2.008 - class: Dist::Zilla::Plugin::Git::Commit name: '@Author::RWSTAUNER/@Git/Commit' version: 2.008 - class: Dist::Zilla::Plugin::Git::Tag name: '@Author::RWSTAUNER/@Git/Tag' version: 2.008 - class: Dist::Zilla::Plugin::Git::Push name: '@Author::RWSTAUNER/@Git/Push' version: 2.008 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::RWSTAUNER/ConfirmRelease' version: 4.300030 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::RWSTAUNER/UploadToCPAN' version: 4.300030 - class: Dist::Zilla::Plugin::InstallRelease name: '@Author::RWSTAUNER/InstallRelease' version: 0.008 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: 4.300030 - class: Dist::Zilla::Plugin::Run::BeforeBuild name: Run::BeforeBuild version: 0.015 - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: Test::ReportPrereqs version: 0.004 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 4.300030 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 4.300030 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 4.300030 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 4.300030 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 4.300030 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 4.300030 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 4.300030 x_authority: cpan:RWSTAUNER Dist-Metadata-0.925/xt/0000755000175000017500000000000012105062622013571 5ustar randorandoDist-Metadata-0.925/xt/author/0000755000175000017500000000000012105062622015073 5ustar randorandoDist-Metadata-0.925/xt/author/test-eol.t0000644000175000017500000000036412105062622017017 0ustar randorandouse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::EOL 0.07 eval "use Test::EOL; 1;" or die $@; # ^^ hack to get around prereqscanner detection, remove someday all_perl_files_ok({ trailing_whitespace => 1 }); Dist-Metadata-0.925/xt/author/pod-spell.t0000644000175000017500000000047212105062622017162 0ustar randorandouse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.002006 eval "use Test::Spelling 0.12; use Pod::Wordlist::hanekomu; 1" or die $@; add_stopwords(); all_pod_files_spelling_ok('bin', 'lib'); __DATA__ Randy Stauner lib Dist Metadata Struct Archive Dir Tar Zip Dist-Metadata-0.925/xt/author/critic.t0000644000175000017500000000043512105062622016537 0ustar randorando#!perl use strict; use warnings; use Test::More; use English qw(-no_match_vars); eval "use Test::Perl::Critic"; plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; all_critic_ok(); Dist-Metadata-0.925/xt/release/0000755000175000017500000000000012105062622015211 5ustar randorandoDist-Metadata-0.925/xt/release/kwalitee.t0000644000175000017500000000036112105062622017203 0ustar randorando#!perl # This test is generated by Dist::Zilla::Plugin::Test::Kwalitee use strict; use warnings; use Test::More; # needed to provide plan. eval "use Test::Kwalitee"; plan skip_all => "Test::Kwalitee required for testing kwalitee" if $@; Dist-Metadata-0.925/xt/release/pod-coverage.t0000644000175000017500000000052712105062622017755 0ustar randorando#!perl use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Dist-Metadata-0.925/xt/release/pod-syntax.t0000644000175000017500000000021212105062622017477 0ustar randorando#!perl use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); Dist-Metadata-0.925/xt/release/pod-linkcheck.t0000644000175000017500000000053712105062622020116 0ustar randorando#!perl use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ){ plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ( $@ ) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } Dist-Metadata-0.925/xt/release/cpan-changes.t0000644000175000017500000000023312105062622017723 0ustar randorando#!perl use Test::More; eval 'use Test::CPAN::Changes'; plan skip_all => 'Test::CPAN::Changes required for this test' if $@; changes_ok(); done_testing(); Dist-Metadata-0.925/xt/release/mojibake.t0000644000175000017500000000040612105062622017157 0ustar randorando#!perl use strict; use warnings qw(all); use Test::More; ## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval) eval q(use Test::Mojibake); plan skip_all => q(Test::Mojibake required for source encoding testing) if $@; all_files_encoding_ok(); Dist-Metadata-0.925/xt/release/minimum-version.t0000644000175000017500000000027012105062622020533 0ustar randorando#!perl use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_from_metayml_ok(); Dist-Metadata-0.925/xt/release/changes_has_content.t0000644000175000017500000000201112105062622021365 0ustar randorando#!perl use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '0.925'; my $trial_token = '-TRIAL'; SKIP: { ok(-e $changes_file, "$changes_file file exists") or skip 'Changes is missing', 1; ok(_get_changes($newver), "$changes_file has content for $newver"); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; my $changelog = join('', <$fh>); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } Dist-Metadata-0.925/xt/release/no-tabs.t0000644000175000017500000000021212105062622016734 0ustar randorandouse strict; use warnings; use Test::More; eval 'use Test::NoTabs'; plan skip_all => 'Test::NoTabs required' if $@; all_perl_files_ok(); Dist-Metadata-0.925/xt/release/synopsis.t0000644000175000017500000000022512105062622017264 0ustar randorando#!perl use Test::More; eval "use Test::Synopsis"; plan skip_all => "Test::Synopsis required for testing synopses" if $@; all_synopsis_ok('lib'); Dist-Metadata-0.925/xt/release/unused-vars.t0000644000175000017500000000020712105062622017651 0ustar randorando#!perl use Test::More; eval "use Test::Vars"; plan skip_all => "Test::Vars required for testing unused vars" if $@; all_vars_ok(); Dist-Metadata-0.925/xt/release/test-version.t0000644000175000017500000000064312105062622020043 0ustar randorandouse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 0.002004 BEGIN { eval "use Test::Version; 1;" or die $@; } my @imports = ( 'version_all_ok' ); my $params = { is_strict => 0, has_version => 1, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; Dist-Metadata-0.925/xt/release/dist-manifest.t0000644000175000017500000000023012105062622020140 0ustar randorando#!perl use Test::More; eval "use Test::DistManifest"; plan skip_all => "Test::DistManifest required for testing the manifest" if $@; manifest_ok(); Dist-Metadata-0.925/xt/release/meta-json.t0000644000175000017500000000023312105062622017271 0ustar randorando#!perl use Test::More; eval 'use Test::CPAN::Meta::JSON'; plan skip_all => 'Test::CPAN::Meta::JSON required for testing META.json' if $@; meta_json_ok(); Dist-Metadata-0.925/xt/release/distmeta.t0000644000175000017500000000021712105062622017210 0ustar randorando#!perl use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); Dist-Metadata-0.925/dist.ini0000644000175000017500000000173712105062622014612 0ustar randorandoname = Dist-Metadata author = Randy Stauner license = Perl_5 copyright_holder = Randy Stauner copyright_year = 2011 [@Author::RWSTAUNER] :version = 3.203 -remove = Test::ReportPrereqs ; TODO: remove this after releasing a new author bundle -remove = ReportVersions::Tiny ;PortabilityTests.options = test_mac_length = 0, test_one_dot = 0 -remove = Test::Portability [%PodWeaver] -StopWords.include = TODO dist dists dir unix checksum checksums [Prereqs] ; File::Temp->newdir File::Temp = 0.19 File::Spec::Native = 1.002 ; These Digest mods are in core as of 5.8/5.10. Digest = 1.03 Digest::MD5 = 2 Digest::SHA = 5 [Run::BeforeBuild] ; generate test data run = corpus/make_dists ; CPAN::Meta requires Parse::CPAN::Meta which requires JSON::PP ; but in some smoke test environments it seems to be missing. ; JSON-2.27 bundled it's own JSON:PP (2.27008) which may be the culprit. [Test::ReportPrereqs] :version = 0.004 include = JSON::PP include = JSON Dist-Metadata-0.925/corpus/0000755000175000017500000000000012105062622014451 5ustar randorandoDist-Metadata-0.925/corpus/make_dists0000755000175000017500000000431012105062622016520 0ustar randorando#!/usr/bin/env perl # # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # # This script is used for generating test data when the dist is built use strict; use warnings; use FindBin; # core use Archive::Any::Create; use File::Find; # core use Path::Class 0.24; use IO::File; # core use Data::Dumper (); # core my $work_dir = $FindBin::Bin; my $structs; my $dists = { metafile => { dir => 'Dist-Metadata-Test-MetaFile-2.2', }, metafile_incomplete => { dir => 'Dist-Metadata-Test-MetaFile-Incomplete-2.1', }, nometafile => { dir => 'Dist-Metadata-Test-NoMetaFile-0.1', }, nometafile_dev_release => { dir => 'Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1', }, index_like_pause => { dir => 'Dist-Metadata-Test-LikePause-0.1', }, subdir => { dir => 'Dist-Metadata-Test-SubDir-1.5', cd => 'subdir', }, noroot => { dir => '.', cd => 'noroot', file => 'noroot', }, }; while( my ($name, $dist) = each %$dists ){ my $archive = Archive::Any::Create->new; my $struct = {}; my $wd = $dist->{cd} ? dir( $work_dir, $dist->{cd} ) : $work_dir; my $fd = dir( $wd, $dist->{dir} ); my @files; find({ wanted => sub { push @files, $_ if -f $_; }, no_chdir => 1, }, $fd ); foreach my $file ( @files ){ my $rel = file($file)->relative($wd); my $content = slurp($file); $archive->add_file( $rel => $content ); # convert relative file path from Native to Unix since DM Struct defaults to Unix. $struct->{ $rel->as_foreign('Unix') } = $content; } my $base = $dist->{file} || $dist->{dir}; $archive->write_file(file($work_dir, "$base.$_")->stringify) for qw(tar.gz zip); $structs->{$name} = $struct; } { local $Data::Dumper::Indent = 1; spit( file($work_dir, 'structs.pl'), Data::Dumper->Dump( [$structs], ['Dist::Metadata::Test::Structs'] ) ); } sub slurp { local $/; IO::File->new($_[0], 'r')->getline } sub spit { IO::File->new($_[0], 'w')->print($_[1]) } Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-2.2.tar.gz0000644000175000017500000000171112105062622023121 0ustar randorandoXo63:/,) 06/I p$F_ %jKE」dGJk(4wN9>4q]ww:  ^=7p : ãuBhJ$Q\::9GOsK-"=];,ҿ \+j 8Xg ‡TFq2U DRK4~."Uo \jN_ ƙHTHS K*a\sR s{tvg-Poiu2el&rTUp;dHr]VBr)Tp6z&JNG9ctTZ@/bt@vd@@N$5dQdSe݄,$o*[qrPMfGOt"JUWF.ᠬҺS^WEUg=C6sU P-AW#Żap~>~.x7w+%Rr)(%p8È)Qw cZO8Ϟ^쇻?@p~_"M:&8+GՎ_2{&}"0&wZg_نAa[9m c>lhzNޱ*@T" ], "dynamic_config" : 0, "generated_by" : "hand", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Metadata-Test-MetaFile", "no_index" : { "directory" : [ "corpus", "examples", "inc", "share", "t", "xt" ] }, "provides" : { "Dist::Metadata::Test::MetaFile" : { "file" : "lib/Dist/Metadata/Test/MetaFile.pm", "version" : "2.1" }, "Dist::Metadata::Test::MetaFile::PM" : { "file" : "lib/Dist/Metadata/Test/MetaFile/PM.pm", "version" : "2.0" } }, "release_status" : "stable", "version" : "2.2" } Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-2.2/META.yml0000644000175000017500000000113512105062622023243 0ustar randorando--- abstract: Fake dist for testing metadata determination author: - Randy Stauner dynamic_config: 0 generated_by: hand license: - perl_5 meta-spec: url: http://search.cpan.org/perldoc?CPAN::Meta::Spec version: '2' name: Dist-Metadata-Test-MetaFile no_index: directory: - corpus - examples - inc - share - t - xt provides: Dist::Metadata::Test::MetaFile: file: lib/Dist/Metadata/Test/MetaFile.pm version: '2.05' Dist::Metadata::Test::MetaFile::PM: file: lib/Dist/Metadata/Test/MetaFile/PM.pm version: '2.04' release_status: stable version: '2.2' Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/0000755000175000017500000000000012105062622024066 5ustar randorandoDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/t/0000755000175000017500000000000012105062622024331 5ustar randorandoDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/t/lib/0000755000175000017500000000000012105062622025077 5ustar randorandoDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/t/lib/Never.pm0000644000175000017500000000044012105062622026512 0ustar randorando# # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # package Never; # ABSTRACT: Never index this 1; Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/README0000644000175000017500000000005312105062622024744 0ustar randorandoThis "dist" is for testing Dist::Metadata. Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/0000755000175000017500000000000012105062622024634 5ustar randorandoDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/0000755000175000017500000000000012105062622025537 5ustar randorandoDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/0000755000175000017500000000000012105062622027257 5ustar randorandoDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/0000755000175000017500000000000012105062622030176 5ustar randorando././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/MetaFile/Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/MetaFil0000755000175000017500000000000012105062622031440 5ustar randorando././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/MetaFile/Incomplete.pmDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/MetaFil0000644000175000017500000000054112105062622031442 0ustar randorando# # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # package Dist::Metadata::Test::MetaFile::Incomplete; # ABSTRACT: Just a file to be indexed our $VERSION = '2.1'; Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/inc/0000755000175000017500000000000012105062622024637 5ustar randorandoDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/inc/NotThis.pm0000644000175000017500000000044212105062622026565 0ustar randorando# # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # package NotThis; # ABSTRACT: Not to be indexed 1; Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.json0000644000175000017500000000107312105062622025510 0ustar randorando{ "abstract" : "Fake dist for testing metadata determination", "author" : [ "Randy Stauner " ], "dynamic_config" : 0, "generated_by" : "hand", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Metadata-Test-MetaFile-Incomplete", "no_index" : { "directory" : [ "examples", "share", "xt" ] }, "provides" : {}, "release_status" : "stable", "version" : "2.1" } Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.yml0000644000175000017500000000060512105062622025340 0ustar randorando--- abstract: Fake dist for testing metadata determination author: - Randy Stauner dynamic_config: 0 generated_by: hand license: - perl_5 meta-spec: url: http://search.cpan.org/perldoc?CPAN::Meta::Spec version: '2' name: Dist-Metadata-Test-MetaFile-Incomplete no_index: directory: - examples - share - xt provides: {} release_status: stable version: '2.2' Dist-Metadata-0.925/corpus/Dist-Metadata-Test-LikePause-0.1.zip0000644000175000017500000000123112105062622022704 0ustar randorandoPKGBj++'Dist-Metadata-Test-LikePause-0.1/READMEThis "dist" is for testing Dist::Metadata. PKGB1|vDDist-Metadata-Test-LikePause-0.1/lib/Dist/Metadata/Test/LikePause.pmpackage Dist::Metadata::Test::LikePause; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = '0.1'; # This should be excluded unless "include_inner_packages" is true package ExtraPackage; our $VERSION = '0.2'; PKGBj++'Dist-Metadata-Test-LikePause-0.1/READMEPKGB1|vDpDist-Metadata-Test-LikePause-0.1/lib/Dist/Metadata/Test/LikePause.pmPKDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1.tar.gz0000644000175000017500000000156512105062622025224 0ustar randorandoXKo@漿bVʥ6AE"i^-Tw6$$x/f~oе~Iܨٶ>>n4lx؝Vq۳n:^6OPM8H5Fb#5ga;"ZYHLgt-g0 !FVp0ŝm@#0ô0a,tƻ|\OERD^?p< ޫgzDl%jѠ7`i$ $'-hBk2NeILh=Mt&}ZK*i=f*' [{s #$#CEJ17#FC2H~'%NaE d*Deᶂq8r3Q3"e|ŨcŠeyeo V+*9bO Yjÿ\JbͦUjޕ빯'*ELwb,!;' t\AWicɿ<[^ǫwN9[v  ^eHMg ݤ뢬GE/ ^V_&IH|=[\: K ]]_|-L4Vhʮ[:דa.V_rrFR `u@`T`Dist-Metadata-0.925/corpus/noroot.tar.gz0000644000175000017500000000055112105062622017121 0ustar randorandok0ܿpڤ?"DfI-{ktAm?)NFT{I&F8j!w=BDwl 1P~Cɿ__06Gz`{~avJuuJN?e\Az+f:@£N>}#Z&E:Nw)/v[W-W6\ *` 't; Dist-Metadata-0.925/corpus/Dist-Metadata-Test-NoMetaFile-0.1.zip0000644000175000017500000000157012105062622023013 0ustar randorandoPKGBj++(Dist-Metadata-Test-NoMetaFile-0.1/READMEThis "dist" is for testing Dist::Metadata. PKGBzyzzFDist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile.pmpackage Dist::Metadata::Test::NoMetaFile; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = '0.1'; PKGBZkkIDist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile/PM.pmpackage Dist::Metadata::Test::NoMetaFile::PM; # ABSTRACT: Just a file to be indexed our $VERSION = '0.1'; PKGBj++(Dist-Metadata-Test-NoMetaFile-0.1/READMEPKGBzyzzFqDist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile.pmPKGBZkkIODist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile/PM.pmPKA!Dist-Metadata-0.925/corpus/Dist-Metadata-Test-SubDir-1.5.zip0000644000175000017500000000151012105062622022217 0ustar randorandoPKGBj++$Dist-Metadata-Test-SubDir-1.5/READMEThis "dist" is for testing Dist::Metadata. PKGBX<˨vv>Dist-Metadata-Test-SubDir-1.5/lib/Dist/Metadata/Test/SubDir.pmpackage Dist::Metadata::Test::SubDir; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = '1.1'; PKGB%ggADist-Metadata-Test-SubDir-1.5/lib/Dist/Metadata/Test/SubDir/PM.pmpackage Dist::Metadata::Test::SubDir::PM; # ABSTRACT: Just a file to be indexed our $VERSION = '1.0'; PKGBj++$Dist-Metadata-Test-SubDir-1.5/READMEPKGBX<˨vv>mDist-Metadata-Test-SubDir-1.5/lib/Dist/Metadata/Test/SubDir.pmPKGB%ggA?Dist-Metadata-Test-SubDir-1.5/lib/Dist/Metadata/Test/SubDir/PM.pmPK-Dist-Metadata-0.925/corpus/noroot/0000755000175000017500000000000012105062622015771 5ustar randorandoDist-Metadata-0.925/corpus/noroot/README0000644000175000017500000000005312105062622016647 0ustar randorandoThis "dist" is for testing Dist::Metadata. Dist-Metadata-0.925/corpus/noroot/lib/0000755000175000017500000000000012105062622016537 5ustar randorandoDist-Metadata-0.925/corpus/noroot/lib/Dist/0000755000175000017500000000000012105062622017442 5ustar randorandoDist-Metadata-0.925/corpus/noroot/lib/Dist/Metadata/0000755000175000017500000000000012105062622021162 5ustar randorandoDist-Metadata-0.925/corpus/noroot/lib/Dist/Metadata/Test/0000755000175000017500000000000012105062622022101 5ustar randorandoDist-Metadata-0.925/corpus/noroot/lib/Dist/Metadata/Test/NoRoot.pm0000644000175000017500000000054612105062622023664 0ustar randorando# # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # package Dist::Metadata::Test::NoRoot; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = '3.3'; Dist-Metadata-0.925/corpus/noroot/lib/Dist/Metadata/Test/NoRoot/0000755000175000017500000000000012105062622023321 5ustar randorandoDist-Metadata-0.925/corpus/noroot/lib/Dist/Metadata/Test/NoRoot/PM.pm0000644000175000017500000000053012105062622024171 0ustar randorando# # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # package Dist::Metadata::Test::NoRoot::PM; # ABSTRACT: Just a file to be indexed our $VERSION = '3.25'; Dist-Metadata-0.925/corpus/Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1.zip0000644000175000017500000000120712105062622025245 0ustar randorandoPKGBj++5Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1/READMEThis "dist" is for testing Dist::Metadata. PKGBب͈^Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1/lib/Dist/Metadata/Test/NoMetaFile/DevRelease.pmpackage Dist::Metadata::Test::NoMetaFile::DevRelease; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = '0.1_1'; PKGBj++5Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1/READMEPKGBب͈^~Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1/lib/Dist/Metadata/Test/NoMetaFile/DevRelease.pmPKDist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-Incomplete-2.1.zip0000644000175000017500000000454012105062622024615 0ustar randorandoPKGB5P;;4Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.json{ "abstract" : "Fake dist for testing metadata determination", "author" : [ "Randy Stauner " ], "dynamic_config" : 0, "generated_by" : "hand", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Metadata-Test-MetaFile-Incomplete", "no_index" : { "directory" : [ "examples", "share", "xt" ] }, "provides" : {}, "release_status" : "stable", "version" : "2.1" } PKGBj++1Dist-Metadata-Test-MetaFile-Incomplete-2.1/READMEThis "dist" is for testing Dist::Metadata. PKGB+13Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.yml--- abstract: Fake dist for testing metadata determination author: - Randy Stauner dynamic_config: 0 generated_by: hand license: - perl_5 meta-spec: url: http://search.cpan.org/perldoc?CPAN::Meta::Spec version: '2' name: Dist-Metadata-Test-MetaFile-Incomplete no_index: directory: - examples - share - xt provides: {} release_status: stable version: '2.2' PKGB)2H009Dist-Metadata-Test-MetaFile-Incomplete-2.1/t/lib/Never.pmpackage Never; # ABSTRACT: Never index this 1; PKGB iqqXDist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/MetaFile/Incomplete.pmpackage Dist::Metadata::Test::MetaFile::Incomplete; # ABSTRACT: Just a file to be indexed our $VERSION = '2.1'; PKGB q229Dist-Metadata-Test-MetaFile-Incomplete-2.1/inc/NotThis.pmpackage NotThis; # ABSTRACT: Not to be indexed 1; PKGB5P;;4Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.jsonPKGBj++1Dist-Metadata-Test-MetaFile-Incomplete-2.1/READMEPKGB+13Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.ymlPKGB)2H009Dist-Metadata-Test-MetaFile-Incomplete-2.1/t/lib/Never.pmPKGB iqqXdDist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/MetaFile/Incomplete.pmPKGB q229KDist-Metadata-Test-MetaFile-Incomplete-2.1/inc/NotThis.pmPKvDist-Metadata-0.925/corpus/Dist-Metadata-Test-SubDir-1.5.tar.gz0000644000175000017500000000056212105062622022630 0ustar randorandon0EWh%V$6!dmR"7Hڢ&YM23wI:J5c: 1#s}D!"}#LD c||[+SZ QIw4i6gDmu/ y/iZUQyY6b-^˕tm(In0,Ca`f+Xhp~KG3falCF|2z<kfv:Rj UYx^YWpNO/p]Yɩq~5˾m"%١<sKIPRgWg Dist-Metadata-0.925/corpus/structs.pl0000644000175000017500000001440212105062622016516 0ustar randorando# # This file is part of Dist-Metadata # # This software is copyright (c) 2011 by Randy Stauner. # # This is free software; you can redistribute it and/or modify it under # the same terms as the Perl 5 programming language system itself. # $Dist::Metadata::Test::Structs = { 'nometafile_dev_release' => { 'Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1/README' => 'This "dist" is for testing Dist::Metadata. ', 'Dist-Metadata-Test-NoMetaFile-DevRelease-0.1_1/lib/Dist/Metadata/Test/NoMetaFile/DevRelease.pm' => 'package Dist::Metadata::Test::NoMetaFile::DevRelease; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = \'0.1_1\'; ' }, 'index_like_pause' => { 'Dist-Metadata-Test-LikePause-0.1/README' => 'This "dist" is for testing Dist::Metadata. ', 'Dist-Metadata-Test-LikePause-0.1/lib/Dist/Metadata/Test/LikePause.pm' => 'package Dist::Metadata::Test::LikePause; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = \'0.1\'; # This should be excluded unless "include_inner_packages" is true package ExtraPackage; our $VERSION = \'0.2\'; ' }, 'metafile' => { 'Dist-Metadata-Test-MetaFile-2.2/lib/Dist/Metadata/Test/MetaFile.pm' => 'package Dist::Metadata::Test::MetaFile; # ABSTRACT: Fake dist for testing metadata determination # does not match META file but we trust the META file our $VERSION = \'1.5\'; ', 'Dist-Metadata-Test-MetaFile-2.2/lib/Dist/Metadata/Test/MetaFile/PM.pm' => 'package Dist::Metadata::Test::MetaFile::PM; # ABSTRACT: Just a file to be indexed our $VERSION = \'1.1\'; ', 'Dist-Metadata-Test-MetaFile-2.2/META.yml' => '--- abstract: Fake dist for testing metadata determination author: - Randy Stauner dynamic_config: 0 generated_by: hand license: - perl_5 meta-spec: url: http://search.cpan.org/perldoc?CPAN::Meta::Spec version: \'2\' name: Dist-Metadata-Test-MetaFile no_index: directory: - corpus - examples - inc - share - t - xt provides: Dist::Metadata::Test::MetaFile: file: lib/Dist/Metadata/Test/MetaFile.pm version: \'2.05\' Dist::Metadata::Test::MetaFile::PM: file: lib/Dist/Metadata/Test/MetaFile/PM.pm version: \'2.04\' release_status: stable version: \'2.2\' ', 'Dist-Metadata-Test-MetaFile-2.2/META.json' => '{ "abstract" : "Fake dist for testing metadata determination", "author" : [ "Randy Stauner " ], "dynamic_config" : 0, "generated_by" : "hand", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Metadata-Test-MetaFile", "no_index" : { "directory" : [ "corpus", "examples", "inc", "share", "t", "xt" ] }, "provides" : { "Dist::Metadata::Test::MetaFile" : { "file" : "lib/Dist/Metadata/Test/MetaFile.pm", "version" : "2.1" }, "Dist::Metadata::Test::MetaFile::PM" : { "file" : "lib/Dist/Metadata/Test/MetaFile/PM.pm", "version" : "2.0" } }, "release_status" : "stable", "version" : "2.2" } ', 'Dist-Metadata-Test-MetaFile-2.2/README' => 'This "dist" is for testing Dist::Metadata. ' }, 'metafile_incomplete' => { 'Dist-Metadata-Test-MetaFile-Incomplete-2.1/lib/Dist/Metadata/Test/MetaFile/Incomplete.pm' => 'package Dist::Metadata::Test::MetaFile::Incomplete; # ABSTRACT: Just a file to be indexed our $VERSION = \'2.1\'; ', 'Dist-Metadata-Test-MetaFile-Incomplete-2.1/README' => 'This "dist" is for testing Dist::Metadata. ', 'Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.yml' => '--- abstract: Fake dist for testing metadata determination author: - Randy Stauner dynamic_config: 0 generated_by: hand license: - perl_5 meta-spec: url: http://search.cpan.org/perldoc?CPAN::Meta::Spec version: \'2\' name: Dist-Metadata-Test-MetaFile-Incomplete no_index: directory: - examples - share - xt provides: {} release_status: stable version: \'2.2\' ', 'Dist-Metadata-Test-MetaFile-Incomplete-2.1/inc/NotThis.pm' => 'package NotThis; # ABSTRACT: Not to be indexed 1; ', 'Dist-Metadata-Test-MetaFile-Incomplete-2.1/t/lib/Never.pm' => 'package Never; # ABSTRACT: Never index this 1; ', 'Dist-Metadata-Test-MetaFile-Incomplete-2.1/META.json' => '{ "abstract" : "Fake dist for testing metadata determination", "author" : [ "Randy Stauner " ], "dynamic_config" : 0, "generated_by" : "hand", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Metadata-Test-MetaFile-Incomplete", "no_index" : { "directory" : [ "examples", "share", "xt" ] }, "provides" : {}, "release_status" : "stable", "version" : "2.1" } ' }, 'nometafile' => { 'Dist-Metadata-Test-NoMetaFile-0.1/README' => 'This "dist" is for testing Dist::Metadata. ', 'Dist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile/PM.pm' => 'package Dist::Metadata::Test::NoMetaFile::PM; # ABSTRACT: Just a file to be indexed our $VERSION = \'0.1\'; ', 'Dist-Metadata-Test-NoMetaFile-0.1/lib/Dist/Metadata/Test/NoMetaFile.pm' => 'package Dist::Metadata::Test::NoMetaFile; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = \'0.1\'; ' }, 'noroot' => { 'lib/Dist/Metadata/Test/NoRoot.pm' => 'package Dist::Metadata::Test::NoRoot; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = \'3.3\'; ', 'lib/Dist/Metadata/Test/NoRoot/PM.pm' => 'package Dist::Metadata::Test::NoRoot::PM; # ABSTRACT: Just a file to be indexed our $VERSION = \'3.25\'; ', 'README' => 'This "dist" is for testing Dist::Metadata. ' }, 'subdir' => { 'Dist-Metadata-Test-SubDir-1.5/lib/Dist/Metadata/Test/SubDir.pm' => 'package Dist::Metadata::Test::SubDir; # ABSTRACT: Fake dist for testing metadata determination our $VERSION = \'1.1\'; ', 'Dist-Metadata-Test-SubDir-1.5/lib/Dist/Metadata/Test/SubDir/PM.pm' => 'package Dist::Metadata::Test::SubDir::PM; # ABSTRACT: Just a file to be indexed our $VERSION = \'1.0\'; ', 'Dist-Metadata-Test-SubDir-1.5/README' => 'This "dist" is for testing Dist::Metadata. ' } }; Dist-Metadata-0.925/corpus/Dist-Metadata-Test-NoMetaFile-0.1.tar.gz0000644000175000017500000000056212105062622023416 0ustar randorandoMk0sxpOڤkZUѲ{\ j+5>X) <4M?]d8 C0&1D)P$&4B?oyV4f3HU/g\^*lZDDIyN~Z%(7`2`JsV3?-9<4O ); c~oTRm{[3fBa>Ot1|NLV3dBr/sd{^q*mX̦]-~݁k-i<}M/QOk?c\^Ok;gSdx s{ R$Dist-Metadata-0.925/corpus/Dist-Metadata-Test-MetaFile-2.2.zip0000644000175000017500000000524612105062622022525 0ustar randorandoPKGBw$yy)Dist-Metadata-Test-MetaFile-2.2/META.json{ "abstract" : "Fake dist for testing metadata determination", "author" : [ "Randy Stauner " ], "dynamic_config" : 0, "generated_by" : "hand", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Metadata-Test-MetaFile", "no_index" : { "directory" : [ "corpus", "examples", "inc", "share", "t", "xt" ] }, "provides" : { "Dist::Metadata::Test::MetaFile" : { "file" : "lib/Dist/Metadata/Test/MetaFile.pm", "version" : "2.1" }, "Dist::Metadata::Test::MetaFile::PM" : { "file" : "lib/Dist/Metadata/Test/MetaFile/PM.pm", "version" : "2.0" } }, "release_status" : "stable", "version" : "2.2" } PKGBj++&Dist-Metadata-Test-MetaFile-2.2/READMEThis "dist" is for testing Dist::Metadata. PKGBh=O(]](Dist-Metadata-Test-MetaFile-2.2/META.yml--- abstract: Fake dist for testing metadata determination author: - Randy Stauner dynamic_config: 0 generated_by: hand license: - perl_5 meta-spec: url: http://search.cpan.org/perldoc?CPAN::Meta::Spec version: '2' name: Dist-Metadata-Test-MetaFile no_index: directory: - corpus - examples - inc - share - t - xt provides: Dist::Metadata::Test::MetaFile: file: lib/Dist/Metadata/Test/MetaFile.pm version: '2.05' Dist::Metadata::Test::MetaFile::PM: file: lib/Dist/Metadata/Test/MetaFile/PM.pm version: '2.04' release_status: stable version: '2.2' PKGBBDist-Metadata-Test-MetaFile-2.2/lib/Dist/Metadata/Test/MetaFile.pmpackage Dist::Metadata::Test::MetaFile; # ABSTRACT: Fake dist for testing metadata determination # does not match META file but we trust the META file our $VERSION = '1.5'; PKGBiiEDist-Metadata-Test-MetaFile-2.2/lib/Dist/Metadata/Test/MetaFile/PM.pmpackage Dist::Metadata::Test::MetaFile::PM; # ABSTRACT: Just a file to be indexed our $VERSION = '1.1'; PKGBw$yy)Dist-Metadata-Test-MetaFile-2.2/META.jsonPKGBj++&Dist-Metadata-Test-MetaFile-2.2/READMEPKGBh=O(]](/Dist-Metadata-Test-MetaFile-2.2/META.ymlPKGBBDist-Metadata-Test-MetaFile-2.2/lib/Dist/Metadata/Test/MetaFile.pmPKGBiiEDist-Metadata-Test-MetaFile-2.2/lib/Dist/Metadata/Test/MetaFile/PM.pmPKDist-Metadata-0.925/Changes0000644000175000017500000000660212105062622014435 0ustar randorandoRevision history for Dist-Metadata 0.925 2013-02-08T02:40:09Z - Specify 1.03 as minimum required version of Digest to ensure that it tries Digest::SHA. Closes gh-6. 0.924 2012-11-10T17:38:33Z - Add 'module_info' method for getting additional data (like checksums) with the provided module hashref. Thanks to Jeffrey Ryan Thalhammer for the suggestion. - Add 'file_checksum' method to the Dist::Metadata::Dist base class. 0.923 2012-06-19T03:13:55Z - By default, when determining packages, filter out packages that don't match the file name (ones that can't be loaded via use/require). This mimics the behavior of PAUSE. If you want the old behavior of including "inner" packages in the meta "provides" set "include_inner_packages" to true in the constructor. Thanks to Jeffrey Ryan Thalhammer for finding and fixing this (and including tests)! 0.922 2011-10-19T22:30:53Z - Let CPAN::Meta set release_status instead of defaulting to 'stable'. Fixes an issue with dev/alpha versions. Thanks to Jeffrey Ryan Thalhammer (thaljef) for reporting and fixing. 0.921 2011-09-09T23:10:21Z - Fix 'no_index' checking with non-unix paths. 0.920 2011-08-18T04:11:45Z [API Change] - Dist::extract_into() and Dist::physical_directory() now return just $dir in scalar context (and continue to return ($dir, @files) in list context) [Enhancements] - Support zip archives (in addition to tar files). (Thanks to thaljef for reporting.) [Fixes] - Always include inc/, t/, and xt/ in meta/no_index. (Thanks to thaljef for reporting.) - Make return value of Dir::physical_directory() consistent with other subclasses. 0.915 2011-08-16T18:52:01Z - Remove warning for no packages found (thaljef). 0.914 2011-08-02T16:01:46Z - Use Path::Class::Dir's mkpath for simplicity/compatibility. Closes RT 69961. Thanks to MELEZHIK for reporting. 0.913 2011-07-19T21:15:24Z - Pass paths to CPAN::DistnameInfo in Unix format. Thanks to jeroenl for figuring out that test failure on Win32. Closes RT 69585. - Remove unnecessary build file from release tarball 0.912 2011-07-14T23:38:40Z - Use CPAN::DistnameInfo to parse name/version from file name 0.911 2011-07-04T22:10:24Z - Fix test to use non-os specific paths in regexp 0.910 2011-07-03T00:06:00Z [Fixes] - Work around weird, possible perl bug (described at http://bit.ly/mhaQ4x) that made Struct->file_content return undef for IO-like objects [Prereqs] - use Path::Class instead of File::Spec - ensure File::Spec::Native is available [Documentation] - Clarify details of module's purpose in Pod Description [Testing] - Add dist format tests - Report version of JSON::PP (if any) installed to help debug troublesome smoke testing environments 0.904 2011-06-24T06:09:23Z - Fix path mismatch for "provides" when using Module::Metadata on Win32 - Add more TODO ideas 0.903 2011-06-23T05:59:41Z - Load File::Spec (and subclasses) consistently 0.902 2011-06-23T05:51:42Z [Fixes] - Change determine_packages to always return paths in unix format (as required by CPAN::Meta::Spec) - Fix regexp path bugs on windows [Enhancements] - Include 'xt/' in the default no_index:directory list [Documentation] - Add items to pod TODO list 0.901 2011-06-22T01:22:07Z - Initial release