<html><head></head><body bgcolor="#FFFFFF"><div>package False::Laziness;</div><div>...<br><br>Sent from my iPhone</div><div><br>On 10/04/2012, at 3:29 PM, Dana Diederich <<a href="mailto:diederich@gmail.com">diederich@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>That's a bit of an absolute statement, Randal.  There are definitely highly relevant cases where it doesn't make sense to use Moose and friends.  If program load time or overall performance is a primary goal, 'old school' Perl might make more sense.  Granted it's often possible to re-frame the overall problem so those aspects aren't as important, but it often doesn't make sense to do that.<div>
<br></div><div><div>dana@hithlum:~/bench$ cat p1</div><div>#!/usr/bin/perl</div><div><br></div><div>my $foo = {};</div><div>bless $foo, 'Foo';</div><div><br></div><div>my $counter = 1;</div><div>for(1..100000) {</div>
<div>    $counter = $foo->adder($counter);</div><div>}</div><div>print "$counter\n";</div><div><br></div><div>package Foo;</div><div><br></div><div>sub</div><div>adder {</div><div>    return $_ + 1;</div><div>
}</div><div><br></div><div><div>dana@hithlum:~/bench$ time ./p1</div><div>100001</div><div><br></div><div>real    0m0.045s</div><div>user    0m0.044s</div><div>sys     0m0.000s</div><div>dana@hithlum:~/bench$ cat p2</div>
<div>#!/usr/bin/perl</div><div><br></div><div>use lib '.';</div><div>use Foo;</div><div><br></div><div>my $foo = Foo->new;</div><div>my $counter = 1;</div><div>for(1..100000) {</div><div>    $counter = $foo->adder($counter);</div>
<div>}</div><div>print "$counter\n";</div><div>dana@hithlum:~/bench$ cat Foo.pm </div><div>use MooseX::Declare;</div></div><div><div><br></div><div>class Foo {</div><div>    method adder (Num $ct) {</div><div>        return $ct + 1;</div>
<div>    }</div><div>}</div><div>dana@hithlum:~/bench$ time perl ./p2</div><div>100001</div><div><br></div><div>real    0m13.718s</div><div>user    0m13.661s</div><div>sys     0m0.044s</div><div>dana@hithlum:~/bench$ </div>
</div><div><br></div><div>I write code using Moose and the wide galaxy of exceptional modules it has spawned every day.  And I yearn for the day that I can use Perl6 in my production environment.  (It's getting close, last time I looked!)  But sometimes raw 'cpu' performance is important.</div>
<div><br></div><div>Most of the time, I start using the highest-level modules possible, and if there's a performance problem, I end up 'dumbing down' the hot-spots, using simpler Perl.  For me, this is rare.</div>
<div><br></div><div>Cheers,</div><div>-Dana</div><div><br><div class="gmail_quote">On Tue, Apr 10, 2012 at 2:00 PM, Randal L. Schwartz <span dir="ltr"><<a href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>>>>> "Dodger" == Dodger  <<a href="mailto:el.dodgero@gmail.com">el.dodgero@gmail.com</a>> writes:<br>

<br>
Dodger> So... How about some old school perl without mooses and meeses?<br>
Dodger> Anybody out there code in... You know... Perl?<br>
<br>
Seriously, if you're launching green code and not using Moose, you have<br>
some weird nostalgia in you that prevents you from being a useful coder<br>
for me or my clients.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - <a href="tel:%2B1%20503%20777%200095" value="+15037770095">+1 503 777 0095</a><br>
<<a href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>> <URL:<a href="http://www.stonehenge.com/merlyn/" target="_blank">http://www.stonehenge.com/merlyn/</a>><br>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.<br>
See <a href="http://methodsandmessages.posterous.com/" target="_blank">http://methodsandmessages.posterous.com/</a> for Smalltalk discussion<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org">SanFrancisco-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
</div></div></blockquote></div><br></div></div>
</div></blockquote></body></html>