Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Optional modules?

by crouchingpenguin (Priest)
on Feb 27, 2003 at 14:37 UTC ( [id://239106]=note: print w/replies, xml ) Need Help??


in reply to Optional modules?

To add on to the suggestions above, I would also put it all in a BEGIN block.

#!/usr/bin/perl use strict; use warnings; use vars qw( $ne_loaded ); + BEGIN { eval "use Non::Existent"; if ($@) { warn "You don't have Non::Existent installed so..."; $ne_loaded = 0; } }

cp
---
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://239106]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found