Skip Menu |

This queue is for tickets about the Apache-Backhand CPAN distribution.

Report information
The Basics
Id: 5088
Status: new
Priority: 0/
Queue: Apache-Backhand

People
Owner: Nobody in particular
Requestors: vfelix [...] tigr.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Error in Makefile.PL with ARGV handling
The Makefile.PL does not properly pass arguments that may be necessary for ExtUtils::MakeMaker such as PREFIX or LIB. As is, the Makefile.PL does not allow the code to be installed in an alternate location as may be necessary if you do not have root privileges. The error seems to be with the grep calls with @ARGV. Inlcuded in this report is a modified version that fixes the problem. Here are the corrected lines: @ARGV = grep { $_ !~ /BACKHAND_SRCDIR/ } @ARGV; @ARGV = grep { $_ !~ /APACHE_SRCDIR/ } @ARGV; Version: Apache-Backhand-0.02 Perl version: 5.6.0 (problem is likely exhibited in 5.8.x as well) Operating system: Red Hat Linux 7.3 with a 2.4.18 kernel Cheers!
use ExtUtils::MakeMaker; use strict; my $backhand_incdir; my $apache_incdir; my $apache_osdir; BEGIN { foreach my $arg (@ARGV) { if ($arg =~ /BACKHAND_SRCDIR=(.*)/) { $backhand_incdir = $1; } if ($arg =~ /APACHE_SRCDIR=(.*)/) { $apache_incdir = $1; } } if (! defined $backhand_incdir) { die "You must specify a BACKHAND_SRCDIR - the path to your\n" . "mod_backhand source tree"; } if (! defined $apache_incdir) { die "You must specify an APACHE_SRCDIR - the path to your\n" . "apache 1.3.X source tree"; } if (! -d $backhand_incdir) { die 'BACKHAND_SRCDIR is not a directory'; } if (! -f "${backhand_incdir}/mod_backhand.h") { die 'mod_backhand.h not found'; } if (! -f "${backhand_incdir}/serverstat.h") { die 'serverstat.h not found'; } if (! -d $apache_incdir) { die 'APACHE_SRCDIR is not a directory'; } $apache_osdir = $apache_incdir . '/os/unix'; $apache_incdir .= '/include'; if (! -f "${apache_incdir}/httpd.h") { die "${apache_incdir}/httpd.h not found"; } if (! -f "${apache_incdir}/http_log.h") { die "${apache_incdir}/http_log.h not found"; } @ARGV = grep { $_ !~ /BACKHAND_SRCDIR/ } @ARGV; @ARGV = grep { $_ !~ /APACHE_SRCDIR/ } @ARGV; print <<EOF; ** NOTICE ** The byPerl shared object file (byPerl.so on most unix platforms) is not built or installed by default. See the file README.byPerl for details. ** NOTICE ** EOF } WriteMakefile( 'NAME' => 'Apache::Backhand', 'VERSION_FROM' => 'Backhand.pm', 'OPTIMIZE' => '-O3', 'OBJECT' => 'Backhand.o magic_c_int.o', 'INC' => "-I. -I${backhand_incdir} -I${apache_incdir} " . "-I${apache_osdir}", 'realclean' => { 'FILES' => 'byPerl.so byPerl.o' }, ); package MY; sub postamble { ' byPerl: byPerl.$(DLEXT) byPerl.$(DLEXT): Makefile byPerl$(OBJ_EXT) $(LD) -o $@ $(LDDLFLAGS) $(OTHERLDFLAGS) byPerl$(OBJ_EXT) '; }