develooper Front page | perl.perl5.porters | Postings from February 2013

Re: Keeping track of used modules (Was: Perl 7 or Perl 2013?)

Thread Previous | Thread Next
From:
David Golden
Date:
February 12, 2013 11:16
Subject:
Re: Keeping track of used modules (Was: Perl 7 or Perl 2013?)
Message ID:
CAOeq1c9R1poA-sxTSnP1FovbjM0srKQOXq-vSZUvaRav=iZGDQ@mail.gmail.com
On Tue, Feb 12, 2013 at 3:51 AM, Johan Vromans <jvromans@squirrel.nl> wrote:
> Greg Lindahl <greg@blekko.com> writes:
>
>> I would love to have something that I could wire into my build system
>> that would report, every few weeks, all the CPAN modules that I use,
>
> The best tool for this is perl itself. We would need a very light-weight
> way to store some usage data upon termination. A shared memory file,
> maybe?

If you have Path::Iterator::Rule and a filesystem that supports atime:

$ perl -MPath::Iterator::Rule -wE 'say for
Path::Iterator::Rule->new->skip_dirs(".")->perl_module->accessed("<7")->all(@INC)'

(For modules used in the last week.)

I leave it to the reader to convert that back to a list of modules.

-- 
David Golden <xdg@xdg.me>
Take back your inbox! → http://www.bunchmail.com/
Twitter/IRC: @xdg

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About