Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Find installed Perl modules matching a regular expression

by toolic (Bishop)
on Sep 26, 2009 at 00:49 UTC ( #797632=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Find installed Perl modules matching a regular expression
in thread Find installed Perl modules matching a regular expression

Nice idea. However, it does not seem to work if a sub-directory of a directory in @INC has been modified. Since directories under @INC can be arbitrarily deep, it would be necessary to perform a find on all directories, which is what the init file was designed to avoid.

Perhaps there is a more efficient way to check if any directory has been modified throughout a tree.


Comment on Re^3: Find installed Perl modules matching a regular expression
Re^4: Find installed Perl modules matching a regular expression
by Anonymous Monk on Sep 26, 2009 at 01:08 UTC
    it would be necessary to perform a find on all directories

    I don't think that is neccessary. perllocal.pod lives in @INC, and when you install modules (with ExtUtils::MakeMaker), perllocal.pod gets updated, and the directory mtime gets updated.

    Since Module::Build doesn't update perllocal (yet), and neither do ppm or apt-get..., after installing a module an admin might touch @INC

    $atime = $mtime = time; utime $atime, $mtime, @INC;

    Additional directories to check might be

    perl -V:installbin -V:installscript -V:installsitebin
      Thanks for the explanations. I will investigate these tips further.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-02 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls