In perl.git, the branch book/perlsecret has been updated <http://perl5.git.perl.org/perl.git/commitdiff/75a3f12ff3e8252fad85f1c431ea4a0cc533ffda?hp=6829971e95c046710e7d3e08709759a744151553>
- Log ----------------------------------------------------------------- commit 75a3f12ff3e8252fad85f1c431ea4a0cc533ffda Author: Keith C. Ivey <[email protected]> Date: Fri Apr 6 23:35:17 2012 -0300 Fix Enterprise example. M pod/perlsecret.pod M t/japh/secret.t commit c9cb7779f781a640c2eb9d5bd664e1deeb2ab5ad Author: Keith C. Ivey <[email protected]> Date: Fri Apr 6 23:32:10 2012 -0300 Add missing 'm' in ornate doubled-shaped sword in table. M pod/perlsecret.pod ----------------------------------------------------------------------- Summary of changes: pod/perlsecret.pod | 4 ++-- t/japh/secret.t | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pod/perlsecret.pod b/pod/perlsecret.pod index e92c7ef..50f38a7 100644 --- a/pod/perlsecret.pod +++ b/pod/perlsecret.pod @@ -21,7 +21,7 @@ Perl secret operators: =( )= Goatse scalar / list context =< >=~ Flaming X-Wing match input, assign captures ~~<> Kite a single line of input - <<m=~>> m ; Ornate double-bladed sword multiline comment + <<m=~m>> m; Ornate double-bladed sword multiline comment -=! -=!! Flathead conditional decrement +=! +=!! Phillips conditional increment x=! x=!! Pozidriv conditional reset to '' @@ -579,7 +579,7 @@ match the condition, in a single statement: ('apples' )x!! ( $cupboard{apples} < 2 ), ('bananas' )x!! ( $cupboard{bananas} < 2 ), ('cherries' )x!! ( $cupboard{cherries} < 20 ), - ('gin' )x!! $cupboard{tonic}, + ('tonic' )x!! $cupboard{gin}, ); The boolean list squash is simply a list repetition operator C<< ()x >> diff --git a/t/japh/secret.t b/t/japh/secret.t index 6ec9aa7..637864c 100644 --- a/t/japh/secret.t +++ b/t/japh/secret.t @@ -228,7 +228,7 @@ is( "@{[ sort keys %got ]}", '1 2 3', ',=>' ); apples => 3, bananas => 1, cherries => 41, - tonic => 5, + gin => 1, ); @got = ( 'bread', @@ -236,9 +236,9 @@ is( "@{[ sort keys %got ]}", '1 2 3', ',=>' ); ('apples' )x!! ( $got{apples} < 2 ), ('bananas' )x!! ( $got{bananas} < 2 ), ('cherries')x!! ( $got{cherries} < 20 ), - ('gin' )x!! $got{tonic}, + ('tonic' )x!! $got{gin}, ); -is( "@got", "bread milk bananas gin", '()x!!' ); +is( "@got", "bread milk bananas tonic", '()x!!' ); # space fleet is( <=><=><=>, 0, '<=><=><=>' ); -- Perl5 Master Repository
