Skip to content
Browse files

[bin/crypt] no need to modify $command in-place

Also, we want to work on the lc'd version, in case people decide to WRITE IN
ALL CAPS.
  • Loading branch information...
1 parent 72ef665 commit 7d8ed2473cd9ca788594aad988a9c2278bfebcc8 @masak committed Jul 2, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 bin/crypt
View
5 bin/crypt
@@ -311,9 +311,8 @@ multi MAIN('hanoi') {
sub munge { $^s.subst(/' disk'»/, '_disk', :g) }
sub unmunge { $^s.subst(/'_disk'»/, ' disk', :g) }
- $command .= &munge;
- my $verb = $command.words[0].&unmunge;
- my @args = $command.words[1..*]».&unmunge;
+ my $verb = .&munge.words[0].&unmunge;
+ my @args = .&munge.words[1..*]».&unmunge;
when %commands.exists($verb) {
my @req_args = %commands{$verb}.list;
when @args != @req_args {

0 comments on commit 7d8ed24

Please sign in to comment.
Something went wrong with that request. Please try again.