Devel::PerlLog - Log Information When `perl` Runs
export PERL5OPT='-MDevel::PerlLog=/tmp/perl.log'
Perl gets run a lot. Many times by things that you didn't even know were Perl. Even simple things that you know are Perl end up spawning lots of other Perl processes. This can make some things hard to figure out.
For instance, when you run make (after running perl Makefile.PL), over 10 Perl processes are started.
make
perl Makefile.PL
This module gives you a way of logging every time a new Perl process starts, and giving you specific information about that Perl process. You just need to load this module using the PERL5OPT environment variable.
PERL5OPT
All the configuration options for this module are made as arguments to - MDevel::PerlLog. For example:
- MDevel::PerlLog
export PERL5OPT="-MDevel::PerlLog=$PWD/perl.log,all"
This section documents the configuration options.
By default, loggin will be done to STDOUT. If you pass an argument string containing a / or a . then that will be used as the file path. You should take care to use an absolute file path, or else a new log will be started relative to where the Perl starts.
/
.
The following arguments are responsible for reporting certain information about the Perl process:
argv
This will dump the @ARGV at the start of the process.
cwd
This will show the cwd at the start of the process.
pid
This will report the Perl process id (PID).
Since there are so many plugins, you can specify groups:
all
argv, cwd, pid
Ingy döt Net <ingy@cpan.org>
Copyright 2011-2015. Ingy döt Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Devel::PerlLog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::PerlLog
CPAN shell
perl -MCPAN -e shell install Devel::PerlLog
For more information on module installation, please visit the detailed CPAN module installation guide.