21 my @opt = <<'=back' =~ /B<--(\S+)>/g;
25 CPAN mirror root directory. Defaults to /home/ftp/pub/PAUSE
33 defaults to Parse::CPAN::Meta. Also supported: YAML::Syck
43 use File
::Basename
qw(dirname);
44 use File
::Path
qw(mkpath);
48 use Hash
::Util
qw(lock_keys);
51 lock_keys
%Opt, map { /([^=]+)/ } @opt;
56 $Opt{cpan
} ||= "/home/ftp/pub/PAUSE";
62 return unless /\.meta$/;
64 if ($Opt{parser
} eq "Parse::CPAN::Meta") {
65 require Parse
::CPAN
::Meta
;
66 unlink "/tmp/meta.yaml" or die $! if -e
"/tmp/meta.yaml";
67 symlink $File::Find
::name
, "/tmp/meta.yaml";
68 $ok = eval { Parse
::CPAN
::Meta
->load_file("/tmp/meta.yaml"); };
69 unlink "/tmp/meta.yaml" or die $!;
70 } elsif ($Opt{parser
} eq "YAML::Syck") {
72 $ok = eval { YAML
::Syck
::LoadFile
($File::Find
::name
); };
73 } elsif ($Opt{parser
} eq "YAML::XS") {
75 $ok = eval { YAML
::XS
::LoadFile
($File::Find
::name
); };
79 warn "$Opt{parser} could not parse $counter\: $File::Find::name\:\n$@\n";
83 $Opt{cpan
} . "/authors/id"