Skip Menu |
 

This queue is for tickets about the Scalar-Defer CPAN distribution.

Report information
The Basics
Id: 31039
Status: open
Priority: 0/
Queue: Scalar-Defer

People
Owner: Nobody in particular
Requestors: siracusa [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Download (untitled) / with headers
text/plain 601b
Scalar::Defer 0.11 breaks Rose::HTML::Objects 0.550. The following patch fixes it, though I'm not sure if it's universally valid. --- lib/Scalar/Defer.pm 2007-11-28 12:03:20.000000000 -0500 +++ lib/Scalar/Defer.pm~ 2007-11-25 14:30:00.000000000 -0500 @@ -89,7 +89,7 @@ no strict 'refs'; no warnings 'redefine'; - foreach my $sym (grep { $_ ne 'AUTOLOAD' } keys %UNIVERSAL::) { + foreach my $sym (keys %UNIVERSAL::) { *{$sym} = sub { unshift @_, Scalar::Defer::SUB_FORCE()->(shift(@_)); goto &{$_[0]->can($sym)};
Download (untitled) / with headers
text/plain 658b
Here's a more generic patch: --- lib/Scalar/Defer.pm.old 2007-11-25 14:30:00.000000000 -0500 +++ lib/Scalar/Defer.pm 2007-11-28 13:04:13.000000000 -0500 @@ -90,9 +90,16 @@ no warnings 'redefine'; foreach my $sym (keys %UNIVERSAL::) { + my $original_code = \&{$sym}; *{$sym} = sub { unshift @_, Scalar::Defer::SUB_FORCE()->(shift(@_)); - goto &{$_[0]->can($sym)}; + + if(my $code = $_[0]->can($sym)) { + goto &$code; + } + else { + &$original_code; + } }; }
Download (untitled) / with headers
text/plain 698b
Okay, third time's the charm (forgot a goto in the last patch): --- lib/Scalar/Defer.pm.old 2007-11-25 14:30:00.000000000 -0500 +++ lib/Scalar/Defer.pm 2007-11-28 13:09:53.000000000 -0500 @@ -90,9 +90,16 @@ no warnings 'redefine'; foreach my $sym (keys %UNIVERSAL::) { + my $original_code = \&{$sym}; *{$sym} = sub { unshift @_, Scalar::Defer::SUB_FORCE()->(shift(@_)); - goto &{$_[0]->can($sym)}; + + if(my $code = $_[0]->can($sym)) { + goto &$code; + } + else { + goto &$original_code; + } }; }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.