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
David Golden
February 13, 2013 15:52
Re: Keeping track of used modules (Was: Perl 7 or Perl 2013?)
Message ID:
On Wed, Feb 13, 2013 at 1:53 AM, Greg Lindahl <> wrote:
> 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.

If you don't want to rely on END, then the other way I'd go about it
would be to use an @INC hook to record things at require time.  You
have a little trickiness if things modify @INC ('use lib').  Something
that overrides CORE::GLOBAL::require would work, too, but then you
have to be sure to get the semantics of require exactly right.  (I
also wonder if %INC is tie-able?)

There are plenty of such things on CPAN -- you'd have to figure out if
any serve or adapt your own.



David Golden <>
Take back your inbox! →
Twitter/IRC: @xdg

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About