Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Testing for a module's presence

by ehdonhon (Curate)
on Feb 07, 2005 at 19:28 UTC ( #428786=note: print w/replies, xml ) Need Help??

in reply to Testing for a module's presence

One way to find out if and where a module is installed, assuming it is a CPAN module, and not something you have written yourself is to use

perl -MCPAN -MData::Dumper -e 'print Dumper( CPAN::Shell->expand( "Module", "Test::More" )->inst_file )'

That will return the file location of the module if it is installed, and nothing if it is not.

I note that in your question you specifically mention you do not want to use the module. However, you might want to find a way around that requirement. The problem is that just testing for existence of the .pm file is not always sufficient to know if everything has been installed. It is also not sufficient if you need to know that the file compiles clean.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://428786]
[choroba]: I don't see it when XP doesn't change either
[marinersk]: That has always been its behavior, but I'm a visual/spacial- awareness guy. When the node disappears, it messes with my head, even though it is on the right margin.
[marinersk]: I was hoping there was a way to turn it on and make it stay on.
[LanX]: what is the intention of your question?

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-05-29 13:47 GMT
Find Nodes?
    Voting Booth?