On Wed, 8 Dec 2004, Michael G Schwern wrote:

> Why do the tests do this:
>
>         require Config; import Config;
>         if ($Config{'extensions'} !~ /\bData\/Dumper\b/) {
>             print "1..0 # Skip: Data::Dumper was not built\n";
>             exit 0;
>         }
>
> When it would seem to be a whole lot less obfuscated to do this:
>
>       if( eval { require Data::Dumper } ) {
>           print "1..0 # Skip: Data::Dumper not available\n";
>           exit;
>       }

Offhand, I don't recall any particular reason.  The first version is
probably just the first thing that occurred to me.  (Back when there were
only a few extensions, the first version was not quite as messy-looking as
it is now.)

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to