in reply to how to detect gtk installed or not
One way is to eval the appropriate require:
#! perl use Modern::Perl; my $r1 = eval "require Data::Dumper"; my $r2 = eval "require Non::Exist"; say $_ ? "found" : "missing" for ($r1, $r2);
which on my system prints:
0:35 >perl 478_SoPW.pl found missing 0:37 >
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to detect gtk installed of not
by sdetweil (Sexton) on Jan 13, 2013 at 14:46 UTC | |
by Corion (Patriarch) on Jan 14, 2013 at 08:10 UTC |