This is my latest attempt at a Makefile.PL section that invokes Apache::Bootstrap or exits with exit code 255. The intent is that if Apache::Bootstrap is not installed, the Makefile.PL dies with code 255, the same error number returned to the shell as if 'use 5.8.8;' failed in Makefile.PL.

I'm mainly looking for feedback on this code. The reasons that I need to do what I'm doing may not be all that clear, but I need to use either ExtUtils::MakeMaker or ModPerl::Build::MM, and that depends on the versions of mod_perl (if any) that are installed.

#!/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 to write # the Makefile

In reply to Bootstrapping Makefile.PL with Apache::Bootstrap by redhotpenguin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.