Debug::Comments

CPAN version License

Perl source filter which turns comments into debug messages

This module is a minimalist Perl source filter which converts designated comments into debug trace messages printed via warn(). The behaviour is normally activated by an environment variable (e.g. "DEBUG") in a "use if" pragma. In the absence of the source filter, the comments are just comments, so using the module does not create a dependency on it except to the extent you want to run it with debug output.

Synopsis

use if $ENV{DEBUG}, 'Debug::Comments';
#@! This is a debug message. DEBUG=$ENV{DEBUG}

Key Features

Installation

cpanm Debug::Comments

Requirements

License

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

Author

Brett Watson

See Also