Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl: the Markov chain saw
 
PerlMonks  

Re: how to detect gtk installed or not

by Athanasius (Prior)
on Jan 13, 2013 at 14:39 UTC ( #1013108=note: print w/ replies, xml ) Need Help??


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,


Comment on Re: how to detect gtk installed or not
Select or Download Code
Re^2: how to detect gtk installed of not
by sdetweil (Sexton) on Jan 13, 2013 at 14:46 UTC
    thanks.. unfortunately, my require is against wxPerl, and not any of the underlying system support that wx Requires.

    if I try to start this app, I get a missing DLL/SO error message, which I am trying to suppress as it doesn't help my users at all.

    using Load for wxPerl is really difficult to get working.

      This means that however you tried to install wxPerl, it was a broken attempt. If the wxPerl module were installed properly, or missing completely, require should either work or fail, but not pop up a "SO missing" message.

      But maybe you can be a bit more explicit about how things fail for you, by posting a short, self-contained snippet together with the error messages. That would likely help us to help you better.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-04-17 01:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls