NAME

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

SYNOPSIS

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

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

LWP::EventLoop

COPYRIGHT

Copyright 1997-1998, Gisle Aas

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.