Mark Dootson <[email protected]> writes:
> It just means you don't have to keep coding ..
>
> If (somepackager::is_packed) {
> do this;
> } else {
> do that;
> }
With PerlApp and PAR, I can write:
# If we're a PerlApp, try if it's a bound file.
if ( $PerlApp::VERSION ) {
my $found = PerlApp::extract_bound_file($file);
return $found if -f $found;
}
# If we're a PAR, try if it's an included file.
if ( $PAR::VERSION ) {
my $found = "$ENV{PAR_TEMP}/inc/$file";
return $found if -f $found;
}
Note that this does not require 'use' of any PerlApp/PAR-specific
module and that the code for PerlApp and PAR can happily co-exist.
What would be the Cava equivalent?
-- Johan