MooX-Async-Console
view release on metacpan or search on metacpan
lib/MooX/Async/Console/TCP.pm view on Meta::CPAN
Only one command may be running at a time. This is enforced by the
C<$state> variable.
=cut
use namespace::clean '__line';
sub __on_line {
my $self = shift;
my $client = shift;
my ($cmd, @args) = split ' ', shift;
my $state; # for now - false nothing, true busy;
die 'One command at a time for now' if $state;
$state++;
my $quit;
$self->_logger->debugf('Received command %s %s', $cmd, \@args);
=pod
The L</on_command> event handler is invoked with a new L<Future>.
=cut
( run in 0.310 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )