sub check_cond { my $callback = shift; my $kernel = shift; my $session = shift; my $result = $callback->(); if ($result) { $kernel->post( $session, event => @_ ); } return $result; } # then check_cond(sub { 2 > 1 }, $kernel, $session, @args) and return;
In reply to Re: Cutting repetition in POE coding
by Anonymous Monk
in thread Cutting repetition in POE coding
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |