The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Konstrukt::PrintRedirector - Catches the print statements and fires an event on each print.

SYNOPSIS

        #activate
        $Konstrukt::PrintRedirector->activate();
        
        #print some stuff that should be catched and put into the parsing tree
        print 'stuff';
        
        #deactivate
        $Konstrukt::PrintRedirector->deactivate();

DESCRIPTION

If activated, all print()'s will be intercepted and an event Konstrukt::PrintRedirector::print with the arguments that were printed will be fired. So you have to register an object method for this event (see Konstrukt::Event for more information).

METHODS

new

Constructor of this class

init

Initialization of this class.

activate

Activates the print catcher.

deactivate

Deactivates the print catcher.

AUTHOR

Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.

This document is free software. It is distributed under the same terms as Perl itself.

SEE ALSO

Konstrukt::Plugin::perl, Konstrukt