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
The following behavior is observed with perl 5.20.0 and Readonly 2.00.
Defining a package scalar like so:
Readonly::Scalar our $myvar1 => 'The Readonly Value of myvar1';
behaves as expected when the caller uses "local($myvar1)" to localize its value. But defining a scalar like this:
Readonly our $myvar2 => 'The Readonly Value of myvar2';
results in "attempt to modify read-only value" error at runtime when the caller does "local($myvar2)".
I read the doc concerning the differences between the two forms, but not clear why they should behave differently with localization. Is this a bug or user braindamage?
The following behavior is observed with perl 5.20.0 and Readonly 2.00.
Defining a package scalar like so:
behaves as expected when the caller uses "local($myvar1)" to localize its value. But defining a scalar like this:
results in "attempt to modify read-only value" error at runtime when the caller does "local($myvar2)".
I read the doc concerning the differences between the two forms, but not clear why they should behave differently with localization. Is this a bug or user braindamage?
Minimal example attached.
example.txt
The text was updated successfully, but these errors were encountered: