SPUG: Answered my own question
Creede Lambard
creede at rrauto.com
Thu Feb 15 14:43:42 CST 2001
Here's the code that works:
BEGIN
{
$hasQuote = 1;
unless ( eval { "use Finance::YahooQuote" }) # note the quotes!!
{ $hasQuote = 0; }
}
print $hasQuote;
The trick was using a STRING in the eval rather than a straightforward use
statement.
Now I feel silly, but thanks anyway.
-- Creede
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list