NAME
Math::Logic::Ternary::Calculator::Command - ternary calculator commands
VERSION
This documentation refers to version 0.003 of Math::Logic::Ternary::Calculator::Command.
SYNOPSIS
use Math::Logic::Ternary::Calculator::Command;
use constant CMD => Math::Logic::Ternary::Calculator::Command::;
CMD->def_tool_command('/myfunc', 2, 1, \&myfunc, <<'EOT');
/myfunc foo bar [baz]
frobnicate foo with bar and optional baz
EOT
sub myfunc {
my ($session, $foo, $bar, $baz) = @_;
if ($bar < 0) {
CMD->bad_value("bar = $bar < 0")->execute($session);
}
elsif ($foo !~ /^\w+\z/) {
CMD->wrong_usage("$foo: not an identifier")->execute($session);
}
else {
...
}
return 1; # continue session
}
CMD->tool_command('/myfunc', 'beep', 32);
DESCRIPTION
TODO
Exports
None.
SEE ALSO
AUTHOR
Martin Becker <becker-cpan-mp@cozap.com>
COPYRIGHT AND LICENSE
Copyright (c) 2012-2017 by Martin Becker, Blaubeuren. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.