Think about Loose Coupling | |
PerlMonks |
Re^3: Why do I (sometimes) get a REF ref and not a SCALAR ref? (cycles)by tye (Sage) |
on Jun 23, 2016 at 20:01 UTC ( [id://1166422]=note: print w/replies, xml ) | Need Help?? |
Circularity has nothing to do with whether "REF" or "SCALAR" is returned. "SCALAR" references can be dereferenced via ${ $ref }, exactly like "REF" references, which argues for not making that distinction. Code that is going to traverse from $sv to $$sv is often also code that will traverse from checking ref $av to checking ref $av->[0] and from checking ref $hv to checking ref $hv->{$key} and so can cycle infinitely for any of those cases. - tye
In Section
Seekers of Perl Wisdom
|
|