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> |
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)