mon Chavez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 13, 2004 1:13 PM
Subject: Re: use module only if it exists
> Hi.
> This may be not a high enlightened answer but has solved me some time
> looking for an answer to a question like yours:
>
>
Hi.
This may be not a high enlightened answer but has solved me some time
looking for an answer to a question like yours:
my $IMAGE_SIZE=eval{require Image::Size};
...
if ($IMAGE_SIZE) {
### Some code
### Runs only if Image::Size is installed
}else{
### More code
### Runs if it's not
On Tue, 13 Jul 2004 12:59:06 -0500, JupiterHost.Net wrote
> I know of a module that is almost done with that has a function called
Thanks, but unfortunately I'm working on a very restricted system (not being
able to install custom modules on the production platform is actually the
issue I'm facing
perl.org wrote:
I want my code to call some subroutines in a custom module only if that module
exists on the system. I can think of at least three techniques to determine
if the module exists: scan @INC, use UNIVERSAL::can (not sure that would
work), or put the code in an eval block. What is the
perl.org wrote:
I want my code to call some subroutines in a custom module only if that module
exists on the system. I can think of at least three techniques to determine
if the module exists: scan @INC, use UNIVERSAL::can (not sure that would
work), or put the code in an eval block. What is the