Language::Befunge::Debug - optimized debug solution for language::befunge


Language-Befunge documentation  | view source Contained in the Language-Befunge distribution.

Index


NAME

Top

Language::Befunge::Debug - optimized debug solution for language::befunge

SYNOPSIS

Top

    use Language::Befunge::Debug;
    debug("foo\n");     # does nothing by default
    Language::Befunge::Debug::enable();
    debug("bar\n");     # now that debug is enabled, output on STDERR
    Language::Befunge::Debug::disable();
    debug("baz\n");     # sorry dave, back to no output







DESCRIPTION

Top

This module provides a debug() subroutine, which output on STDERR if debugging is enabled. If debugging is disabled (the default), perl will optimize out those debugging calls.

PUBLIC API

Top

Exported functions

The module is exporting only one function:

* debug( @stuff );

If debugging is enabled (which is not the default), write @stuff on STDERR.

Other functions

The module also provides 2 functions to control debugging:

* Language::Befunge::Debug::enable();

Request that calls to debug() really start output on STDERR.

* Language::Befunge::Debug::disable();

Request that calls to debug() stop output-ing on STDERR.

SEE ALSO

Top

Language::Befunge

AUTHOR

Top

Jerome Quelin, <jquelin@cpan.org>

Development is discussed on <language-befunge@mongueurs.net>

COPYRIGHT & LICENSE

Top


Language-Befunge documentation  | view source Contained in the Language-Befunge distribution.