I came across code like this in trying to work out a bug in Term::ReadLine::Perl5.
my $term = Term::ReadLine::Stub->new('test');
# $term is a blessed array reference
print $term, ' ', $term->OUT, "\n";
# output is: Term::ReadLine::Stub=ARRAY(0x9d73a7c) GLOB(0x9da48a8)
My question is how does $x->OUT seem to get to be the same thing as $x-> (if I have this right and I might not).
I find this confusing, do others as well? If so, given that for compatibility there the object is an array references, is there a less confusing way to write this. Or is this way preferable, given that's how it is in the documentation?
I should say that I think although Perl allows you to bless an array reference, I think it is a mistake in Term::Readline::Stub to do so.