Created
October 8, 2013 19:28
-
-
Save berekuk/6890146 to your computer and use it in GitHub Desktop.
ubic custom commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
sub custom_commands { qw( foo bar ) }; | |
sub do_custom_command { | |
my ($self, $command) = @_; | |
if ($command eq "foo") { | |
... # do action "foo" | |
} | |
elsif ($command eq "bar") { | |
... # do action "bar" | |
} | |
else { | |
die "Unknown command '$command'"; # should never happen | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment