chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Print better message for unknown operations.
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 4125c37a30432fc848f7d34f08c93c44e33e1426..2852e134289d3e4076c917e0c349d8e208953eaf 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-2218,4
+2218,7
@@
if (!@ARGV) {
}
my $cmd = shift @ARGV;
$cmd =~ y/-/_/;
-{ no strict qw(refs); &{"cmd_$cmd"}(); }
+
+my $fn = ${*::}{"cmd_$cmd"};
+$fn or badusage "unknown operation $cmd";
+$fn->();