Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't warn when gisting &map, &grep, etc.; RT #123895
The issue was that these subs had signatures with an unnamed "|"
parameter in them, and a check was never made to see if "|" or "\"
parameters had names.
  • Loading branch information
Mouq committed Feb 23, 2015
1 parent d850a9a commit bb3a3df
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/core/Parameter.pm
Expand Up @@ -175,12 +175,18 @@ my class Parameter { # declared in BOOTSTRAP
}
$perl ~= " ::$_" for @($.type_captures);
my $name = $.name;
if $!flags +& $SIG_ELEM_IS_CAPTURE {
$name = '|' ~ $name;
} elsif $!flags +& $SIG_ELEM_IS_PARCEL {
$name = '\\' ~ $name unless $name ~~ /^^ <[@$]>/;
} elsif !$name {
if $!flags +& $SIG_ELEM_ARRAY_SIGIL {
if $name {
if $!flags +& $SIG_ELEM_IS_CAPTURE {
$name = '|' ~ $name;
} elsif $!flags +& $SIG_ELEM_IS_PARCEL {
$name = '\\' ~ $name unless $name ~~ /^^ <[@$]>/;
}
} else {
if $!flags +& $SIG_ELEM_IS_CAPTURE {
$name = '|';
} elsif $!flags +& $SIG_ELEM_IS_PARCEL {
$name = '\\';
} elsif $!flags +& $SIG_ELEM_ARRAY_SIGIL {
$name = '@';
} elsif $!flags +& $SIG_ELEM_HASH_SIGIL {
$name = '%';
Expand Down

0 comments on commit bb3a3df

Please sign in to comment.