Skip to content

Instantly share code, notes, and snippets.

@berekuk
Created October 8, 2013 19:28
Show Gist options
  • Save berekuk/6890146 to your computer and use it in GitHub Desktop.
Save berekuk/6890146 to your computer and use it in GitHub Desktop.
ubic custom commands
...
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