Permalink
Browse files

movie sub/hash syntax

  • Loading branch information...
1 parent 480b93c commit 89021cf8e0f3e1dab3109520b0a0917fb8daac09 @ivanoff ivanoff committed Aug 11, 2013
Showing with 0 additions and 25 deletions.
  1. +0 −25 S13-syntax/sub-hash.t
View
@@ -1,25 +0,0 @@
-use v6;
-
-use Test;
-
-plan 2;
-
-# RT #76896:
-# perl6 - sub/hash syntax
-
-sub to_check {
- my %fs = ();
- %fs{ lc( 'A' ) } = &fa;
- sub fa() { return 'fa called.'; }
-
- %fs{ lc( 'B' ) } = &fb;
- sub fb() { return 'fb called.'; }
-
- my $fn = lc( @_[ 0 ] || 'A' );
- return %fs{ $fn }();
-}
-
-is to_check, "fa called.", 'fa called ok';
-is to_check('B'), "fb called.", 'fb called ok';
-
-# vim: ft=perl6

0 comments on commit 89021cf

Please sign in to comment.