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

Re: Keeping track of used modules

Thread Previous | Thread Next
From:
Johan Vromans
Date:
February 13, 2013 07:27
Subject:
Re: Keeping track of used modules
Message ID:
m2wquchdwn.fsf@phoenix.squirrel.nl
Jan Dubois <jand@activestate.com> writes:

> END { require DB_File; tie my %h, "DB_File", "$ENV{HOME}/zzz";
> $h{$_}++ for values %INC }

A raw dump of %INC would be fine, and requires less overhead, e.g.

  END {
    open my $fh, '>>',  "$ENV{HOME}/zzz";
    print { $fh } localtime, " $$\n",
      map { "$_\n" } for values %INC;
  }

-- Johan

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