if ( eval {require Foo} ) {
useFoo();
} elsif ( eval {require Alternate} ) {
useAlternate();
} else {
fake_it();
}
Thanks,
Randy.
Is there a way to make C<require> or C<use> fail without manipulating
@INC or hiding the physical file? Or more generally, how do you test all
branches of constructs like:
- Howto make 'require' fail ? Randy W. Sims
- Re: Howto make 'require' fail ? Ivan Tubert-Brohman
- Re: Howto make 'require' fail ? Michael Graham
- Re: Howto make 'require' fail ? Randy W. Sims
- Re: Howto make 'require' fail ? Adriano Ferreira
- Re: Howto make 'require' fail ? Ivan Tubert-Brohman
- Re: Howto make 'require' fail ? Michael G Schwern
- Re: Howto make 'require' fail ? Randy W. Sims
- Re: Howto make 'require' fail ? Michael G Schwern
