So I guess you'd rather do
ormy $pointless_reference = $obj->getPosition(); my ($x, $y) = @$pointless_reference[0,1];
instead ofmy ($x, $y) = @{$obj->getPosition()};
right? Restricting myself to returning just one value just because most languages do not allow anything more seems silly to me. Especially compared to such dirty tricks as updating the values of some variables passed by reference or something.my ($x, $y) = $obj->getPosition();
To me bending backwards to always return a single scalar is a code smell. A code smell sugesting that the author writes C or some other language, but definitely not Perl. Even though the code is full of sigils and there are regexps scattered around.
In reply to Re^4: Module Announcement: Perl-Critic-1.01
by Jenda
in thread Module Announcement: Perl-Critic-1.01
by jthalhammer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |