Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Locate modules called by script

by jhourcle (Prior)
on May 10, 2005 at 15:11 UTC ( [id://455608]=note: print w/replies, xml ) Need Help??


in reply to Locate modules called by script

I need to figure out where all these modules reside to copy to the Linux system

I use the following to get info about where a module is, what other modules it ends up loading, and its version:

#!/bin/sh perl "-M$1" -e 'print map { sprintf( "%20s : %s\n", $_, $INC{$_} ) } s +ort keys %INC; print "\n'$1' version : $'$1'::VERSION\n\n"'

That being said, it's very important to look at where it is, before you decide to up and move it to a different architecture or OS. Take the following:

$ ./whichpm XML::Parser AutoLoader.pm : /System/Library/Perl/5.8.1/AutoLoader.pm Carp.pm : /System/Library/Perl/5.8.1/Carp.pm Config.pm : /System/Library/Perl/5.8.1/darwin-thread-multi- +2level/Config.pm Cwd.pm : /System/Library/Perl/5.8.1/darwin-thread-multi- +2level/Cwd.pm DynaLoader.pm : /System/Library/Perl/5.8.1/darwin-thread-multi- +2level/DynaLoader.pm Exporter.pm : /System/Library/Perl/5.8.1/Exporter.pm File/Spec.pm : /System/Library/Perl/5.8.1/File/Spec.pm File/Spec/Unix.pm : /System/Library/Perl/5.8.1/File/Spec/Unix.pm XML/Parser.pm : /Library/Perl/5.8.1/darwin-thread-multi-2level/ +XML/Parser.pm XML/Parser/Expat.pm : /Library/Perl/5.8.1/darwin-thread-multi-2level/ +XML/Parser/Expat.pm XSLoader.pm : /System/Library/Perl/5.8.1/darwin-thread-multi- +2level/XSLoader.pm base.pm : /System/Library/Perl/5.8.1/base.pm overload.pm : /System/Library/Perl/5.8.1/overload.pm strict.pm : /System/Library/Perl/5.8.1/strict.pm vars.pm : /System/Library/Perl/5.8.1/vars.pm warnings.pm : /System/Library/Perl/5.8.1/warnings.pm warnings/register.pm : /System/Library/Perl/5.8.1/warnings/register.pm XML::Parser version : 2.34

Any of the components with the architecture in their name (in this example, 'darwin-thread-multi-2level', have compiled components, and cannot just be picked up and moved to the new server.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-18 09:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found