sub flatten {
my $proto = shift;
return @_ unless defined $proto;
- my @args;
+ my @args;
while ($proto =~ /(\\?)(\[[^\]]+\]|[^\];])/g) {
my $p = $2;
if ($1) {
my $cur = '$_[' . $i . ']';
if ($ref) {
if (length $p > 1) {
- return 'my $r = ' . $opts->{ref} . '(' . $cur . '); '
+ return 'my $r = ' . $opts->{ref} . '(' . $cur . '); '
. join ' els',
map( {
"if (\$r eq '" . $reftypes{$_} ."') { "