Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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

Replies are listed 'Best First'.
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?
[marto]: good morning all, TCIF
[Discipulus]: TCIF & chips marto! and sane dots too
[Corion]: Hi marto ;) All Hail Crunchy!
[Corion]: marto:I hope you're well

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2017-02-24 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (353 votes). Check out past polls.