[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Possible bad MakeMaker interaction...



When updating checkbot, I found that it ended up depending on
perl-5.005.  This is obviouly not necessary, so I tried to figure why
this happened.

If you use what is, I guess, the "idiomatic" ("laser" :-) way of
dealing with scripts when using MakeMaker, you'll put something like:

# Write the Makefile
WriteMakefile(
	      NAME   => "checkbot",
	      PL_FILES  => { 'checkbot.pl' => 'checkbot' },
	      EXE_FILES => [ 'checkbot' ],
	      MAN3PODS => {},
	      PM => {},
	      VERSION_FROM => q(checkbot.pl),
	      dist => {COMPRESS => 'gzip',
		       SUFFIX => 'gz' },
);

in your Makefile.PL, and checkbot.pl will have a header that looks
something like this:

use Config;
use File::Basename qw(basename dirname);
chdir(dirname($0));
($file = basename($0)) =~ s/\.pl$//;
$file =~ s/\.pl$//
        if ($Config{'osname'} eq 'VMS' or
            $Config{'osname'} eq 'OS2');  # "case-forgiving"
open OUT,">$file" or die "Can't create $file: $!";
chmod(0755, $file);
print "Extracting $file (with variable substitutions)\n";
 
print OUT <<"!GROK!THIS!";
$Config{'startperl'} -w
    eval 'exec perl -S \$0 "\$@"'
        if 0;
 
!GROK!THIS!
 
print OUT <<'!NO!SUBS!';
[...]
!NO!SUBS!

The problem is that $Config{'startperl'} isn't /usr/bin/perl, it's
/usr/bin/perl-5.00X, apparently.

Anyone have any suggestions?

Mike.


Reply to: