Class::Delay::Message - class that represents a delayed message


Class-Delay documentation Contained in the Class-Delay distribution.

Index


Code Index:

NAME

Top

Class::Delay::Message - class that represents a delayed message

METHODS

Top

package

The package that the delaying method was installed into.

method

The method being called

args

The arguments the method was called with.

is_trigger

True if the Message is a release method.

AUTHOR

Top

Richard Clamp <richardc@unixbeard.net>

COPYRIGHT

Top


Class-Delay documentation Contained in the Class-Delay distribution.

use strict;
package Class::Delay::Message;
use base 'Class::Accessor::Fast';
__PACKAGE__->mk_accessors(qw( package method args is_trigger ));

sub resume {
    my $self = shift;
    my @args = @{ $self->args };
    my $invocant = shift @args;
    my $method   = $self->method;
    $invocant->$method( @args );
}

1;
__END__