Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Phred (5358)

Phred
  fredNO@SPAMtaperfriendlymusic.org
http://www.redhotpenguin.com/

Fred is a Perl and PostgreSQL geek. He has made some very small contributions to a few cpan modules and mod_perl.

Journal of Phred (5358)

Tuesday April 28, 2009
12:03 AM

Bootstrapping Makefile.PL with Apache::Bootstrap

[ #38884 ]

Update - the Perlmonks node.

This is my latest attempt at a Makefile.PL section that invokes Apache::Bootstrap or exits with 255. The intent is that if Apache::Bootstrap is not installed, the Makefile.PL dies with exit code 255, the same failure code returned to the shell as if 'use 5.8.8;' failed in Makefile.PL. I've been looking around for a list where the MakeMaker experts hang out, please clue me in if you know of such a place.

#!/usr/bin/perl

use strict;
use warnings;

################################################################### ######
# minimum version of A::B required
my $ab = 0.06;

eval { require Apache::Bootstrap };

($@ or ($Apache::Bootstrap::VERSION < $ab)) &&
    do { $! = 255; die("Apache::Bootstrap $ab required"); };

# make sure we have at least one minimum version of mod_perl

my $bs = eval { Apache::Bootstrap->new({
                      mod_perl2 => 1.99022,
                      mod_perl  => 1.30 }) };

do { $! = 255; die($@); } if $@;

######################################################################### #

# use $bs to determine whether ExtUtils::MakeMaker or ModPerl::Build::MM should be used

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.