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:
Greg Lindahl
Date:
February 13, 2013 06:54
Subject:
Re: Keeping track of used modules (Was: Perl 7 or Perl 2013?)
Message ID:
20130213065356.GE9313@bx9.net
On Tue, Feb 12, 2013 at 11:35:45AM -0800, Jan Dubois wrote:

> Put this into your sitecustomize.pl file:
> 
> END { require DB_File; tie my %h, "DB_File", "$ENV{HOME}/zzz";
> $h{$_}++ for values %INC }

That's quite awesome. Like most big perl shops, we have a lot of
perversity about our environment that makes the atime thing hard, but
this concept works perfectly! Just to give you an idea, we have

* noatime on all disks
* a separate install tree of Perl modules for each of a dozen
long-lived processes
* said daemons are crash-only (kill -9 == no END)
* some normal short-lived scripts, too

In addition to using END (for short-lived scripts) I'll just have the
daemons report daily, sweep everything up, et voila! A little cleaning
of the data, and I'd be happy to make it public.

-- greg



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