[Chicago-talk] is there a perl which?

Mike Fragassi frag at ripco.com
Wed Feb 8 07:35:06 PST 2006


On Wed, 8 Feb 2006, Andy Lester wrote:

> > Is there a function in Perl analygous to the Unix 'which', for
> > saying where in
> > the @INC it will find a package?
>
> Before it finds it?  Not that I know of.  But after it's loaded, yes,
> you look in %INC.

Better still: install Module::Info from CPAN.
It comes with the script module_info, which lets you do this:

  $> module_info DBI

  Name:        DBI
  Version:     1.42
  Directory:   /usr/local/foo/lib/i686-linux
  File:        /usr/local/foo/lib/i686-linux/DBI.pm
  Core module: no

-- Mike F.


More information about the Chicago-talk mailing list