Skip Menu |

This queue is for tickets about the Method-Signatures-Simple CPAN distribution.

Report information
The Basics
Id: 80509
Status: rejected
Priority: 0/
Queue: Method-Signatures-Simple

People
Owner: Nobody in particular
Requestors: MAUKE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.02
Fixed in: (no value)



Subject: func keyword has wrong operator precedence
$ cat bug/func-precedence #!perl use Method::Signatures::Simple; my $refaddr = func ($x) { $x } + 0; __END__ $ perl bug/func-precedence Too many arguments for main::func at bug/func-precedence line 3, near "0;" Execution of bug/func-precedence aborted due to compilation errors. I expected this to do the equivalent of: my $refaddr = sub { my ($x) = @_; $x } + 0;
On Tue Oct 30 19:05:58 2012, MAUKE wrote: Show quoted text
> $ cat bug/func-precedence > #!perl > use Method::Signatures::Simple; > my $refaddr = func ($x) { $x } + 0; > __END__ > $ perl bug/func-precedence > Too many arguments for main::func at bug/func-precedence line 3, near
"0;" Show quoted text
> Execution of bug/func-precedence aborted due to compilation errors. > > I expected this to do the equivalent of: > my $refaddr = sub { my ($x) = @_; $x } + 0;
Due to the way D::D works, it is actually more like this: perl -e ' sub foo (&) {}; my $refaddr = foo { } + 0; ' And that also dies with: Too many arguments for main::foo at -e line 3, near "0;" Execution of -e aborted due to compilation errors. So I'd rather blame this on how the perl parser works. rhesa