NAME

Devel::System::Trace

DESCRIPTION

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).

CONFIGURATION

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 :

verbose = 1|0> : if set to true, commands, STDERR and STDOUT are grabbed, then printed to stdout.
logfile => 1|0 : if set to true, commands, STDERR and STDOUT are logged to the given file.
dry_run => 1|0 : if set to true, disable the calls to system.

With no options given, the pragma is disabled : system() will behave unaltered.

EXAMPLES

# 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;

AUTHOR

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 AND LICENSE

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.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 231:

Non-ASCII character seen before =encoding in 'Raphaël'. Assuming UTF-8