Class-Delay README


Class-Delay documentation  | view source Contained in the Class-Delay distribution.

Index


NAME

Top

Class::Delay - delay method dispatch until a trigerring event

SYNOPSIS

Top

 package PrintOut;
 sub write {
    my $self = shift;
    print "printing: ", @_, "\n";
 }
 sub flush {
    print "flushed\n";
 }

 package DelayedPrint;
 use base 'PrintOut';
 use Class::Delay
    methods => [ 'write' ],
    release => [ 'flush' ];

 package main;

 DelayedPrint->write( "we'll write this later" ); # won't get through
                                                  # to PrintOuts 'write' yet
 DelayedPrint->write( "this too" );
 DelayedPrint->flush;  # all of the queued call are dispatched
 DelayedPrint->write( "this won't be delayed" );




DEPENDENCIES

Top

This module has external dependencies on the following modules:

 Class::Accessor::Fast
 Test::More
 perl	5.006

INSTALLATION

Top

 perl Build.PL
 perl Build test

and if all goes well

 perl Build install

HISTORY

Top

What changed over the last 3 revisions

0.02 Wednesday 22nd October, 2003
	Fixed a test failure - now the triggering method will also return the
	nominated value also.




0.01 Tuesday 21st October, 2003
	Initial CPAN release
=back

AUTHOR

Top

Richard Clamp <richardc@unixbeard.net>

COPYRIGHT

Top


Class-Delay documentation  | view source Contained in the Class-Delay distribution.