
Devel::System::Trace

This module is designed for tracing every call made to the system() command. It can be useful if you want to track down what external calls are made in a given script.
Under Perl 5.10, this pragam is lexical, you can import it (use Devel::System::Trace) and unimport it (no Devel::System::Trace) as many times as you like, in lexical blocks ; it will works as expected.
Under older Perl interpreters, the scope of the pragma is a package : you can chose to import or unimport it in a package. But be aware that once a "no Devel::System::Trace" is used, the pragma is disabled for the current package for ever (and that means, from the begining of runtime).

When using the pragma, you can choose to change the behaviour of any system() calls made later inthe script.
use Devel::System::Trace %options;
The following options are supported :
With no options given, the pragma is disabled : system() will behave unaltered.

# redirecting every system() outputs to a logfile
package Foo;
use Devel::System::Trace logfile => './foo.log';
...
# disabling system() calls and outputing to stdout the calls
package Bar;
use Devel::System::Trace dry_run => 1,
verbose => 1;

This module was written by Alexis Sukrieh <sukria+perl@sukria.net>.
Thanks to Raphaël Garcia Suarez for his quick help and suggestions for Perl 5.10 / 5.8 integration.

Copyright 2007 by Alexis Sukrieh.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.