[Rt-commit] r5639 - in Scalar-Defer: . t
audreyt at bestpractical.com
audreyt at bestpractical.com
Fri Jul 21 03:41:43 EDT 2006
Author: audreyt
Date: Fri Jul 21 03:41:42 2006
New Revision: 5639
Modified:
Scalar-Defer/Changes
Scalar-Defer/lib/Scalar/Defer.pm
Scalar-Defer/t/01-basic.t
Log:
* This be 0.07.
* Updated internals to work with Pel 5.9.x.
Suggested by: Rafael Garcia-Suarez
Modified: Scalar-Defer/Changes
==============================================================================
--- Scalar-Defer/Changes (original)
+++ Scalar-Defer/Changes Fri Jul 21 03:41:42 2006
@@ -1,3 +1,8 @@
+[Changes for 0.07 - 2006-07-21]
+
+* Updated internals to work with Pel 5.9.x.
+ Suggested by: Rafael Garcia-Suarez
+
[Changes for 0.06 - 2006-07-20]
* Inhibit redefinition warning when Scalar::Defer is loaded twice.
Modified: Scalar-Defer/lib/Scalar/Defer.pm
==============================================================================
--- Scalar-Defer/lib/Scalar/Defer.pm (original)
+++ Scalar-Defer/lib/Scalar/Defer.pm Fri Jul 21 03:41:42 2006
@@ -1,5 +1,5 @@
package Scalar::Defer;
-$Scalar::Defer::VERSION = '0.06';
+$Scalar::Defer::VERSION = '0.07';
use 5.006;
use strict;
@@ -15,12 +15,12 @@
no strict 'refs';
no warnings 'redefine';
- # Set up overload for the package "0".
- overload::OVERLOAD(
- '0' => fallback => 1, map {
- $_ => sub { &{$_defer{ id $_[0] }} }
- } qw( bool "" 0+ ${} @{} %{} &{} *{} )
- );
+ foreach my $sym (keys %UNIVERSAL::) {
+ *{"0::$sym"} = sub {
+ unshift @_, force(shift(@_));
+ goto &{$_[0]->can($sym)};
+ };
+ }
*{"0::AUTOLOAD"} = sub {
my $meth = our $AUTOLOAD;
@@ -33,14 +33,14 @@
goto &{$_[0]->can($meth)};
};
- foreach my $sym (keys %UNIVERSAL::) {
- *{"0::$sym"} = sub {
- unshift @_, force(shift(@_));
- goto &{$_[0]->can($sym)};
- };
- }
-
*{"0::DESTROY"} = \&DESTROY;
+
+ # Set up overload for the package "0".
+ overload::OVERLOAD(
+ '0' => fallback => 1, map {
+ $_ => sub { &{$_defer{ id $_[0] }} }
+ } qw( bool "" 0+ ${} @{} %{} &{} *{} )
+ );
}
sub defer (&) {
Modified: Scalar-Defer/t/01-basic.t
==============================================================================
--- Scalar-Defer/t/01-basic.t (original)
+++ Scalar-Defer/t/01-basic.t Fri Jul 21 03:41:42 2006
@@ -26,4 +26,4 @@
is($obj->meth, 'meth', 'method call works on deferred objects');
is($obj->can('meth'), SomeClass->can('meth'), '->can works too');
ok($obj->isa('SomeClass'), '->isa works too');
-is($obj->VERSION, $SomeClass::VERSION, '->VERSION works too');
+is($obj->VERSION, SomeClass->VERSION, '->VERSION works too');
More information about the Rt-commit
mailing list