POE - Perl Object Environment for Perl 6
class MySession is POE::Session { method dispatch (Str $event, *@args) { given $event { when "say_hello" { return "Hello, @args[0]!"; } ...; } } } my $session = MySession.new; say $POE::Kernel.post($session, "say_hello", "Ingo"); # "Hello, Ingo!"
This is an port of Perl 5's POE to Perl 6. It is only an experiment, it's not API compatible to the original POE, and is possibly very unstable.
$POE::Kernel
post(POE::Session $session, Str $event, *@args)
Calls $session's $event event handler, passing @args as arguments. Note that possibly, the event handler is not called immediately -- other events may be pending processing, too.
$session
$event
@args
run()
Enter the main runloop.
Ingo Blechschmidt <iblech@web.de>
<iblech@web.de>
To install Perl6::Pugs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl6::Pugs
CPAN shell
perl -MCPAN -e shell install Perl6::Pugs
For more information on module installation, please visit the detailed CPAN module installation guide.