Skip Menu |

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

Report information
The Basics
Id: 81364
Status: resolved
Priority: 0/
Queue: Method-Signatures

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

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



Subject: trailing comma in parameter list causes bizarre error
$ cat comma #!perl use Method::Signatures; func foo( $x, $y, ) { } __END__ $ perl comma Use of uninitialized value $sigil in pattern match (m//) at /home/mauke/usr/lib/perl5/site_perl/5.16.2/Method/Signatures.pm line 658. Use of uninitialized value $name in substitution (s///) at /home/mauke/usr/lib/perl5/site_perl/5.16.2/Method/Signatures.pm line 659. Use of uninitialized value $name in substitution (s///) at /home/mauke/usr/lib/perl5/site_perl/5.16.2/Method/Signatures.pm line 660. Use of uninitialized value $sigil in concatenation (.) or string at /home/mauke/usr/lib/perl5/site_perl/5.16.2/Method/Signatures.pm line 663. Use of uninitialized value $name in concatenation (.) or string at /home/mauke/usr/lib/perl5/site_perl/5.16.2/Method/Signatures.pm line 663. Use of uninitialized value in pattern match (m//) at /home/mauke/usr/lib/perl5/site_perl/5.16.2/Method/Signatures.pm line 845. syntax error at comma line 4, near "my =" Execution of comma aborted due to compilation errors.
Doh! I was just complaining on Twitter about languages that don't allow trailing commas. Fixed. https://github.com/schwern/method-signatures/commit/510b77f0b2f9e7bc7b70dd14afdbba4131a7186e