Subject: | M:S can corrupt line numbers for unrelated parts of the file, take 3 |
If a method definition occurs in a larger statement,
the line-numbering can get confused:
$ cat ms2.pl
#!/usr/bin/perl
use strict;
use warnings;
use Method::Signatures;
my $m
=
method la () {
die;
};
warn "Line 14";
__OUTPUT__
Line 14 at ms2.pl line 12.
This occurred in code that used method forms in Moose like
has ... default => method { ... }
In some instances, making sure there was an empty param list ()
seemed to fix it.
The "except the original line numbering is preserved" in the docs
is disappointingly not accurate in all cases.
Thanks,
Brad
Subject: | ms2.pl |
#!/usr/bin/perl
use strict;
use warnings;
use Method::Signatures;
my $m
=
method la () {
die;
};
warn "Line 14";
Subject: | ms3.pl |
#!/usr/bin/perl
use strict;
use warnings;
use Method::Signatures;
my $m
=
method la () {
die;
};
$line_14;