You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#line 15
my $hash = {
over => 'under',
left => 'right',
key => func() {
return __LINE__;
},
foo => "bar",
up => "down",
};
is $hash->{key}->(), 19;
is __LINE__, 26;
It doesn't matter how many hash pairs come before the function, it will always return 16. The function thinks it starts on the same line as the hash.
This has been a problem since at least v20090424. This does not appear to be a mistake on our part, but something wrong with the compiler / Devel::Declare.
This a particular problem in classes which use Moose.
has foo =>
is => 'rw',
default => method() {
return $self->bar + 23;
};
The text was updated successfully, but these errors were encountered:
Function::Parameters doesn't have this problem. It uses the keyword plugin API instead of Devel::Declare. It might be more prudent to adapt it to Method::Signatures. That would mean raising the minimum requirement to 5.14.
Here's an example.
It doesn't matter how many hash pairs come before the function, it will always return 16. The function thinks it starts on the same line as the hash.
This has been a problem since at least v20090424. This does not appear to be a mistake on our part, but something wrong with the compiler / Devel::Declare.
This a particular problem in classes which use Moose.
The text was updated successfully, but these errors were encountered: