[Rt-commit] r5640 - Scalar-Defer/lib/Scalar
audreyt at bestpractical.com
audreyt at bestpractical.com
Fri Jul 21 04:13:45 EDT 2006
Author: audreyt
Date: Fri Jul 21 04:13:44 2006
New Revision: 5640
Modified:
Scalar-Defer/lib/Scalar/Defer.pm
Log:
* update the docs a bit after discussion with Alias++
to say why overload-based implementation is better than a
tie-bsaed one.
Modified: Scalar-Defer/lib/Scalar/Defer.pm
==============================================================================
--- Scalar-Defer/lib/Scalar/Defer.pm (original)
+++ Scalar-Defer/lib/Scalar/Defer.pm Fri Jul 21 04:13:44 2006
@@ -116,11 +116,15 @@
is always the forced value.
Unlike the C<tie>-based L<Data::Lazy>, this module operates on I<values>,
-not I<variables>. Therefore, assigning into C<$dv> and C<$lv> above will
-simply replace the value, instead of triggering a C<STORE> method call.
-
-Also, thanks to the C<overload>-based implementation, this module is about
-2x faster than L<Data::Lazy>.
+not I<variables>. Therefore, assigning anothe value into C<$dv> and C<$lv>
+above will simply replace the value, instead of triggering a C<STORE> method
+call.
+
+Similarily, assigning C<$dv> or C<$dv> into another variable will not trigger
+a C<FETCH> method, but simply propagates the deferred value over without
+evaluationg. This makes it much faster than a C<tie>-based implementation
+-- even under the worst case scenario, where it's always immediately forced
+after creation, this module is still twice as fast than L<Data::Lazy>.
=head1 AUTHORS
More information about the Rt-commit
mailing list