In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/cfa5b3737e4f46c2d507630650f9d3e902d8f81d?hp=dc04e1e9e5625cc5319a68130165b381dfd4c6fa>
- Log ----------------------------------------------------------------- commit cfa5b3737e4f46c2d507630650f9d3e902d8f81d Author: Father Chrysostomos <spr...@cpan.org> Date: Thu Feb 10 14:35:57 2011 -0800 Relation between overloading and ties: second try The current text is confusing as it refers to tied values. Variables, not values, are tied (donât bring up handles, please!). ----------------------------------------------------------------------- Summary of changes: lib/overload.pm | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/overload.pm b/lib/overload.pm index c538177..3abde68 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -1522,7 +1522,8 @@ package C<symbolic>. Add methods sub FETCH { shift } sub nop { } # Around a bug -(the bug is described in L<"BUGS">). One can use this new interface as +(the bug, fixed in Perl 5.14, is described in L<"BUGS">). One can use this +new interface as tie $a, 'symbolic', 3; tie $b, 'symbolic', 4; @@ -1678,17 +1679,18 @@ from two overloaded packages. =item * -Relation between overloading and tie()ing is broken. Overloading is -triggered or not basing on the I<previous> class of tie()d value. +Before Perl 5.14, the relation between overloading and tie()ing was broken. +Overloading is triggered or not basing on the I<previous> class of the +tie()d variable. -This happens because the presence of overloading is checked too early, -before any tie()d access is attempted. If the FETCH()ed class of the -tie()d value does not change, a simple workaround is to access the value +This happened because the presence of overloading was checked +too early, before any tie()d access was attempted. If the +class of the value FETCH()ed from the tied variable does not +change, a simple workaround for code that is to run on older Perl +versions is to access the value (via C<() = $foo> or some such) immediately after tie()ing, so that after this call the I<previous> class coincides with the current one. -B<Needed:> a way to fix this without a speed penalty. - =item * Barewords are not covered by overloaded string constants. -- Perl5 Master Repository