Parse-Distname

 view release on metacpan or  search on metacpan

t/compat/path.t  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
 
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

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  -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.450 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )