GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  POE::WATCHER::DELAY (3)

.ds Aq ’

NAME

POE::Watcher::Delay - wait for a length of time to pass

CONTENTS

SYNOPSIS



        # Note, this is not a complete program.
        # See the distributions examples directory.

        # Request a delay notification.
        my $watcher :Req = POE::Watcher::Delay->new(
                seconds     => 10,            # wait 10 seconds, then
                on_success  => "time_is_up",  # call $self->time_is_up()
                args        => {
                        param_1   => 123,           # with $args->{param_1}
                        param_2   => "abc",         # and $args->{param_2}
                },
        );

        # Handle the delay notification.
        sub time_is_up {
                my ($self, $args) = @_;
                print "$args->{param_1}\n";   # 123
                print "$args->{param_2}\n";   # abc
                my $watcher :Req = undef;     # Destroy the watcher.
        }



DESCRIPTION

A POE::Watcher::Delay object waits a certain amount of time before invoking a method on the current Stage object. Both the time to wait and the method to invoke are given as constructor parameters. Parameters included in the args hash are passed unchanged to the desired callback method after the specified time has elapsed.

PUBLIC METHODS

These methods are invoked directly on the watcher object.

    new seconds => SECONDS, on_success => METHOD_NAME

Construct a new POE::Watcher::Delay object. The constructor takes two parameters: seconds is the number of seconds to wait. on_success is the name of the mothod in the current Stage to invoke when length seconds have elapsed.

Like every other watcher object, this one must be saved in order to remain active. Destroy this object to cancel it.

BUGS

See <http://thirdlobe.com/projects/poe-stage/report/1> for known issues. See <http://thirdlobe.com/projects/poe-stage/newticket> to report one.

POE::Stage is too young for production use. For example, its syntax is still changing. You probably know what you don’t like, or what you need that isn’t included, so consider fixing or adding that, or at least discussing it with the people on POE’s mailing list or IRC channel. Your feedback and contributions will bring POE::Stage closer to usability. We appreciate it.

SEE ALSO

POE::Watcher describes concepts that are common to all POE::Watcher classes. It’s required reading if you want to fully understand what’s going on.

AUTHORS

Rocco Caputo <rcaputo@cpan.org>.

LICENSE

POE::Watcher::Delay is Copyright 2005-2006 by Rocco Caputo. All rights are reserved. You may use, modify, and/or distribute this module under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 POE::WATCHER::DELAY (3) 2008-12-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.