in reply to Obtain Location of .pm in Use
For more information about %INC, see perlvar. For more ways to find the location of a module, see Perl One Liner to Check Location of a Module. Here's another one, off the top of my head:
sub filename_of { my ( $package ) = @_; $package =~ s{::}{/}g; $package .= '.pm'; return $INC{$package}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Obtain Location of .pm in Use
by Anonymous Monk on Aug 30, 2007 at 08:36 UTC |