diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-08-04 01:03:57 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-08-04 01:05:00 +0100 |
commit | a3522f3c05881c36b5630fc6aaa21dde22b5dd06 (patch) | |
tree | 328395a1134be2459ed25c13fe37af50bb6f5f17 /dgit | |
parent | 8b67402e788511056cae31748a1ffafdabb4a9fb (diff) |
Print better message for unknown operations.
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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->(); |