Subject: | is_deeply doesn't handle circular scalar refs |
There is no Refs_Seen checking for scalar refs. It would be better to handle the Refs_Seen stuff at the top _deep_check, and make eq_array/hash jump in there first. That would take care of all types of refs in one place. Search for circular in
http://www.mail-archive.com/perl-qa-help@perl.org/msg01240.html
to see a patch that does this from way back.
my $g = 10;
sub lvsub :lvalue
{
$g;
}
lvsub() = 17;
print lvsub."\n";
__END__
package My;
use Fergal::MM qw( Foo Bar );
$self->Foo(7);
$self->Foo = 7;
$self->X = 12;
$self->Y = 17;
sub setX
{
my $self = shift;
my $val = shift;
print "set X to $val";
$self->SUPER::setX($val);
}
$self->R = 10;
$self->Theta = 90;
$self->{Foo} = 10;
sub new
{
my $pkg = shift;
return bless {}, "My";
}
$thing->M(1, 2, 3);
My::M($thing, 1, 2, 3);
$thing = My::Special->new();
$self->Staff("Manager") = "bill";
sub setStaff
{
my $self = shift;
my $position = shift;
my $person = shift;
$self->{Staff}->{$position} = $person;
$self->{People}->{$person} = $position};
}
A::X;
A::Y;
B::Y;
B::Z;
$obj->A::Y;
A::Y($obj);
$obj1 is a A;
$obj2 is a B;
$obj1->Y;
Y($obj1);
$obj2->Y;
Y($obj2);