Subject: | Uninitialized warning parsing certain signatures including regexps |
When a signature contains a regular expression without an operator, the
Token::Regexp object contains an undef field in the "operator" member.
This throws an uninitialized warning from the _replace_regexps method on
P:M:S at:
my ($word, $rest) = $str =~ /^(@{[$node->{operator}]})(.*)$/s;
Since $node->{operator} is undef.
To reproduce:
perl -MParse::Method::Signatures -e
'Parse::Method::Signatures->param(q#Str $foo where { $_ =~ /foo/ }#);'
Changing /foo/ to m/foo/ does not demonstrate the issue, since the value
of $node->{operator} is "m"