[Catalyst-dev] Re: A try to patch Catalyst::Engine.pm
Aristotle Pagaltzis
pagaltzis at gmx.de
Mon Jul 28 22:06:36 BST 2008
* Chae Lee <yuand2 at gmail.com> [2008-07-28 20:00]:
> my ( $len, $wrote );
> {
> use bytes;
> $len = length($buffer);
> $wrote = syswrite STDOUT, $buffer;
> }
Maybe like so?
my ( $len, $wrote ) = do {
use bytes;
length($buffer),
syswrite(STDOUT, $buffer);
};
Less repetition.
--
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1}
&Just->another->Perl->hack;
#Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Catalyst-dev
mailing list