From: Vincent Pit Date: Mon, 2 Mar 2009 14:16:17 +0000 (+0100) Subject: Reverse the logic for the "skipping declaration" example X-Git-Tag: v0.03~4 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=commitdiff_plain;h=cdabc1884bd85c70f2cb491a669113fdf7aba11c Reverse the logic for the "skipping declaration" example --- diff --git a/lib/Lexical/Types.pm b/lib/Lexical/Types.pm index f84372b..85df039 100644 --- a/lib/Lexical/Types.pm +++ b/lib/Lexical/Types.pm @@ -82,9 +82,9 @@ If the value given is a code reference C<$mangler>, it will be called at compile either an empty list, in which case the current typed lexical definition will be skipped (thus it won't be altered to trigger a run-time hook) ; - use Lexical::Types as => sub { return $_[0] =~ /Str/ ? () : @_ }; - my Str $x; # nothing special - my Int $y; # calls Int->TYPEDSCALAR + use Lexical::Types as => sub { return $_[0] =~ /Str/ ? @_ : () }; + my Str $y; # calls Str->TYPEDSCALAR + my Int $x; # nothing special =item *