Math::Logic::Ternary::Calculator::Command - ternary calculator commands
This documentation refers to version 0.004 of Math::Logic::Ternary::Calculator::Command.
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);
TODO
None.
Martin Becker <becker-cpan-mp@cozap.com>
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.
To install Math::Logic::Ternary, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Logic::Ternary
CPAN shell
perl -MCPAN -e shell install Math::Logic::Ternary
For more information on module installation, please visit the detailed CPAN module installation guide.