The following 3 line test program results in the same error when pushing
__PACKAGE__
onto @ISA:
our @ISA = qw(a b);
push @ISA, 'main';
push @ISA, __PACKAGE__;
"Modification of a read-only value attempted at isabug.pl line 3."
if I change the line
push @ISA, __PACKAGE__;
to
push @ISA, __PACKAGE__.'';
then the error message is also supressed!
At best the error message is confusing, as it seems that
by making the __PACKAGE__ into a temporary expression
when appending an empty string, that the error message
is refering to the read-only'ness of __PACKAGE__,
but it isn't apparent that __PACKAGE__ is being
modified.
anyone have any ideas what is really going on?