LWP::MainLoop - Give access to an single instance of LWP::EventLoop


LWPng-alpha documentation  | view source Contained in the LWPng-alpha distribution.

Index


NAME

Top

LWP::MainLoop - Give access to an single instance of LWP::EventLoop

SYNOPSIS

Top

 use LWP::MainLoop qw(mainloop);
 mainloop->readable(\*STDIN, sub {sysread(STDIN, $buf, 100)});
 mainloop->after(10, sub { print "10 sec later"} );
 mainloop->run;

or

 use LWP::MainLoop qw(readable after run);
 readable(\*STDIN, sub {sysread(STDIN, $buf, 100)});
 after(10, sub { print "10 sec later"} );
 run;

DESCRIPTION

Top

This module gives you access to an single instance of the LWP::EventLoop class. All methods of LWP::EventLoop can be exported and used as a procedural interface. The function mainloop() returns a reference to the single instance.

No functions are exported by default.

SEE ALSO

Top

LWP::EventLoop

COPYRIGHT

Top


LWPng-alpha documentation  | view source Contained in the LWPng-alpha distribution.