Skip Menu |

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

Report information
The Basics
Id: 13857
Status: resolved
Priority: 0/
Queue: Set-Scalar

People
Owner: Nobody in particular
Requestors: Josh [...] allDucky.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.19
Fixed in: (no value)



Subject: Set::Scalar::Base::_binary_underload bug
In sub _binary_underload, Set::Scalar once again assumes that ALL references are objects. What's more, it assumes that ANY reference passed is an instance of Set::Scalar. Instead, I once again suggest using Sclar::Util::blessed to determine that the object is blessed. Here's a proposed fix: sub _binary_underload { # Handle overloaded binary operators. my (@args) = @{ $_[0] }; if (@args == 3) { $args[1] = (ref $args[0])->new( $args[1] ) unless Scalar::Util::blessed($args[1]) && $args[1]->isa('Set::Scalar') ; @args[0, 1] = @args[1, 0] if $args[OVERLOAD_BINARY_REVERSED]; pop @args; } return @args; } Enjoy, Josh
Please see Set::Scalar 1.20.