Skip Menu |
 

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

Report information
The Basics
Id: 123582
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Set-Object

People
Owner: Nobody in particular
Requestors: davem [...] iabyn.com
Cc:
AdminCc:

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



Subject: Set::Object->new() doesn't honour get magic
Date: Fri, 10 Nov 2017 11:25:50 +0000
To: bug-Set-Object [...] rt.cpan.org
From: Dave Mitchell <davem [...] iabyn.com>
Download (untitled) / with headers
text/plain 685b
Set::Object->new(), and probably other methods too, don't honour get magic on its args. For example: package TS { sub TIESCALAR { bless ["tied"] } sub FETCH { $_[0][0] } } my ($a1, $a2); $a1 = "plain"; tie $a2, 'TS'; use Set::Object; my $set = Set::Object->new($a1, $a2); print join ',', $set->members; outputs 'plain'; I'd expect 'plain,tied'. I imagine there will be a similar issue if a tied arg's FETCH() method returns a ref. See also https://rt.perl.org/Ticket/Display.html?id=132152. -- Little fly, thy summer's play my thoughtless hand has terminated with extreme prejudice. (with apologies to William Blake)
Started work in branch https://github.com/rurban/Set-Object/tree/magic-rt123582 -- Reini Urban
Download (untitled) / with headers
text/plain 128b
The new args do now call get-magic. The others not. This fixes at least NetHack-Item. Fixed with 1.36, thanks! -- Reini Urban


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.