Skip to content
Browse files

Perlito5 - perl6 - sub has *@_ signature by default

  • Loading branch information...
1 parent a2918cb commit 68a48a3a78a0bad386ec1b009871f2ecd5a28431 @fglock committed
Showing with 9 additions and 5 deletions.
  1. +1 −2 perlito5.pl
  2. +8 −3 src5/lib/Perlito5/Perl6/Emitter.pm
View
3 perlito5.pl
@@ -12805,8 +12805,7 @@ package Perlito5::AST::Sub;
} @{$self->{'args'}}), ['var' => '*@_']])
}
else {
- push(@parts, ['paren' => '(', ['bareword' => $self->{'sig'}]])
- if defined($self->{'sig'})
+ push(@parts, ['paren' => '(', ['var' => '*@_']])
}
push(@parts, Perlito5::Perl6::emit_perl6_block($self->{'block'}))
if defined($self->{'block'});
View
11 src5/lib/Perlito5/Perl6/Emitter.pm
@@ -662,11 +662,16 @@ package Perlito5::AST::Sub;
push @parts, [ paren => '(',
( map {[ var => $_->emit_perl6(), '?' ]} @{$self->{args}} ),
[ var => '*@_' ]
- ]
+ ];
}
else {
- push @parts, [ paren => '(', [ bareword => $self->{sig} ] ]
- if defined $self->{sig};
+
+ # TODO - use sig
+
+ # push @parts, [ paren => '(', [ bareword => $self->{sig} ] ]
+ # if defined $self->{sig};
+
+ push @parts, [ paren => '(', [ var => '*@_' ] ];
}
push @parts, Perlito5::Perl6::emit_perl6_block($self->{block})

0 comments on commit 68a48a3

Please sign in to comment.
Something went wrong with that request. Please try again.