On Tue, Sep 2, 2008 at 1:17 PM, David E. Wheeler <[EMAIL PROTECTED]> wrote:
>> Ask the maintainers of M::B, EU::MM and M::I to all export a
>> `halt` function that does just this? That would also provide
>> a convenient spot in the respective modules' docs for related
>> CPAN Testers arcana, so people wouldn't have to stumble onto a
>> wiki page in the bottom of a locked cabinet stuck in a disused
>> lavatory with a sign on the door saying "beware the leopard"
>> in order to learn these trivia.
>
> That seems entirely reasonable to me. This would do it, I guess:
>
> sub halt {
>    my ($self, $msg) = @_;
>    require Carp;
>    carp($msg);
>    exit;
> }
>
> Seem reasonable to people? If so, I'll submit it to Module::Build.

That only moves the annoyance.  And possibly magnifies it.

Instead of the annoyance of authors writing "warn $foo and exit 0",
now they'll need to use configure_requires in META.yml to demand an
up-to-date version of Module::Build.  And it still won't work on an
older Perl with an older CPAN or CPANPLUS that doesn't know about
configure_requires.

If you really want this to be abstracted safely, you'll need to do it
like Devel::CheckLib.  Write Devel::HaltPL that exports "halt" and a
script to help authors bundle that in the inc/ directory.  And I'm not
convinced that less annoying or clunky than "warn and exit".

-- David

Reply via email to