X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utils%2Fpl2pm.PL;h=d135bc8c45c5b7251f9bf6dbeda3053008f3bde9;hb=2bd49cfcbebe5157c802aba335cb6f76b1afa6fd;hp=472a478bdf5ec17e217ed90fda804ba430435aa4;hpb=e382b511eb05c19eaf9525763c5c3e149b29c7c8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utils/pl2pm.PL b/utils/pl2pm.PL index 472a478..d135bc8 100644 --- a/utils/pl2pm.PL +++ b/utils/pl2pm.PL @@ -1,4 +1,4 @@ -#!/usr/local/bin/per +#!/usr/local/bin/perl use Config; use File::Basename qw(&basename &dirname); @@ -116,6 +116,7 @@ while (<>) { my $export_ok = ''; my $carp =''; + if (s/\bdie\b/croak/g) { $carp = "use Carp;\n"; s/croak "([^"]*)\\n"/croak "$1"/g; @@ -126,9 +127,9 @@ while (<>) { } if ( open(PM, ">$newname") ) { - print PM <<"END"; + print PM <<"END"; package $newpack; -require 5.6.0; +use 5.006; require Exporter; $carp \@ISA = qw(Exporter); @@ -312,7 +313,6 @@ q qq qr quotemeta -qu qw qx rand