From: David Mitchell Date: Sat, 18 Jul 2009 20:36:14 +0000 (+0100) Subject: add basic usage info to Porting/corelist.pl X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e1018a69a6d7caa246f3b7b9edd786ddb07c94a9;p=p5sagit%2Fp5-mst-13.2.git add basic usage info to Porting/corelist.pl --- diff --git a/Porting/corelist.pl b/Porting/corelist.pl index b301c83..bb0cf92 100644 --- a/Porting/corelist.pl +++ b/Porting/corelist.pl @@ -1,6 +1,13 @@ #!perl # Generates info for Module::CoreList from this perl tree -# run this from the root of a clean perl tree +# run this from the root of a perl tree, using the perl built in that tree. +# +# Data is on STDOUT. +# +# With an optional arg specifying the root of a CPAN mirror, outputs the +# %upstream and %bug_tracker hashes too. + +use 5.010001; # needs Parse::CPAN::Meta use strict; use warnings; @@ -10,11 +17,18 @@ use lib "Porting"; use Maintainers qw(%Modules files_to_modules); use File::Spec; + my %lines; my %module_to_file; my %modlist; + +die "usage: $0 [ cpan-mirror/ ]\n" unless @ARGV <= 1; my $cpan = shift; +if (! -f 'MANIFEST') { + die "Must be run from the root of a clean perl tree\n" +} + if ($cpan) { my $modlistfile = File::Spec->catfile($cpan, 'modules', '02packages.details.txt');