- or download this
BEGIN {
eval "require CGI::Simple; CGI::Simple->import;"
...
$main::q = CGI::Simple->new;
}
}
- or download this
use Module::prefer 'prefer';
# use CGI::Simple if possible, CGI otherwise
...
'CGI' => [1],
],
);
- or download this
$chosen = prefer( \@modspec, @default_args );
- or download this
[ 'Module::Name' => [ $use_default_args, @special_args ], ... ]
- or download this
# 'bar' in default, special args for Module::A
$chosen = prefer (
...
'bar',
);
- or download this
# 'foo' and 'bar' in default, Module::B does it's own thing
$chosen = prefer (
...
'foo', 'bar',
);
- or download this
package Module::Prefer;
use strict;
...
);
=cut