Re: Offtopic: I hate perl installs!



Quoting muppet <scott asofyet org>:
<snip>
i'm sorry the error message isn't more
explicit, but i don't know how to trap a failed 'use'.
</snip>

I use this to add optional modules to my code.

my $module_loaded = eval "use Module; 1" ? 1 : 0;

It could just as easily be adapted to

eval "use Glib ; 1" or die "The Glib-Perl package must be installed first\n";



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]