Skip Menu |

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

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

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

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



Subject: M:S can corrupt line numbers for unrelated parts of the file, take 2
$ cat lineno2 #!perl use warnings; use strict; use Method::Signatures; { my $uniq = 0; method fresh_name() { $self->prefix . $uniq++ } } # this is line 13 method prefix() { $self->{prefix} } my $aref = []; my $oops = %{ $aref }; print "got $oops\n"; __END__ $ perl lineno2 Not a HASH reference at lineno2 line 13. This line number is bogus. Line 13 is "}"; the actual error is on line 20. Corrupted line numbers make debugging runtime errors unnecessarily interesting.
Subject: Re: [rt.cpan.org #81363] M:S can corrupt line numbers for unrelated parts of the file, take 2
Date: Fri, 23 Nov 2012 17:55:43 -0800
To: bug-Method-Signatures [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
This one is puzzling. I've reduced it a bit. #!perl use warnings; use strict; use Method::Signatures; { 1 } method foo {} my $oops = %{ [] }; If I paste in the equivalent compiled Method::Signatures code there's no problem. #!perl use warnings; use strict; use Method::Signatures; sub bar(&) { return $_[0] } # avoid double compilation of method { 1 } bar \&foo; sub foo { BEGIN { Method::Signatures->inject_scope('') }; my $self = shift; Method::Signatures->too_many_args_error(0) if @_ > 0; } my $oops = %{ [] };
I'm just consolidating these three duplicate tickets into one. This ticket is referenced in #87544.