Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to know if there is a way to detect the name of a perl program which has imported a given perl module within that module, so that the information on module usage can be logged to a file.
Basically, I'd like to reverse-engineer which modules are being used by which programs in production; one way would be to drop in a module which logs the name of it's calling program every time it is used. After a period of time (several weeks/months) the typical usage pattern could be detected.
The other option I can think of involves something conceptually along the lines of:
which will probably be slow no matter how I code it.for module in <list of modules to investigate>;do grep $module `find / | xargs file | grep Perl | cut -d":" -f1` done
Suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Auto-detecting module usage
by diotalevi (Canon) on Jan 24, 2006 at 00:01 UTC | |
by Anonymous Monk on Jan 24, 2006 at 16:18 UTC | |
|
Re: Auto-detecting module usage
by tirwhan (Abbot) on Jan 24, 2006 at 09:11 UTC | |
by Anonymous Monk on Jan 24, 2006 at 16:15 UTC | |
|
Re: Auto-detecting module usage
by socketdave (Curate) on Jan 23, 2006 at 22:51 UTC | |
by Anonymous Monk on Jan 23, 2006 at 23:12 UTC | |
by bart (Canon) on Jan 24, 2006 at 09:14 UTC | |
by socketdave (Curate) on Jan 24, 2006 at 04:52 UTC | |
by Anonymous Monk on Jan 24, 2006 at 18:42 UTC |