Parse-Distname
view release on metacpan or search on metacpan
t/compat/path.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Test::Differences;
use JSON::PP;
use Parse::Distname;
local $/ ="";
unified_diff;
sub encode { JSON::PP->new->canonical->pretty->encode(shift) }
while(<DATA>) {
chomp;
s/^#[^\n]+\n//s;
my($file,%exp) = split(/[ \n]+/, $_);
$exp{pathname} = $file;
my $d = Parse::Distname->new($file);
xt/walk_through.t view on Meta::CPAN
-d "$cpan_mirror/authors/id/"
or plan skip_all => "\$ENV{TEST_CPAN_MIRROR} seems not a CPAN mirror";
eval "use CPAN::DistnameInfo 0.12; 1"
or plan skip_all => "requires CPAN::DistnameInfo to compare";
}
my %KnownDiff;
{
local $/ = "";
while(<DATA>) {
s/(?:\015\012|\015|\012)/\n/sg;
s/\A#[^\n]*\n//sg;
my ($file, $diff) = split "\n", $_, 2;
chomp $file; chomp $diff;
$file =~ s/\s*\(.+$//; # remove year info
$KnownDiff{$file} = $diff;
}
}
( run in 0.511 second using v1.01-cache-2.11-cpan-49f99fa48dc )