Your skill will accomplish what the force of many cannot |
|
PerlMonks |
[SOLVED] How does this tricky Perl code in Term::ShellUI using Term::ReadLine dereference an Array?by rockyb (Scribe) |
on Jun 19, 2015 at 13:58 UTC ( [id://1131139]=perlquestion: print w/replies, xml ) | Need Help?? |
rockyb has asked for the wisdom of the Perl Monks concerning the following question: I came across code like this in trying to work out a bug in Term::ReadLine::Perl5.
My question is how does $x->OUT seem to get to be the same thing as $x->[1] (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.
Back to
Seekers of Perl Wisdom
|
|