Random Logic's Journal http://use.perl.org/~Random+Logic/journal/ Random Logic's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:40:11+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 Random Logic's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~Random+Logic/journal/ Call for benchmarking MooseX::Log::Log4perl http://use.perl.org/~Random+Logic/journal/39022?from=rss <p> <a href="http://search.cpan.org/perldoc?MooseX::Log::Log4perl">MooseX::Log::Log4perl</a> acts as a nifty simple role to fit your logging needs. Still being a Moose-based role puts some overhead on each call to a logger function. So every call to <code>$self-&gt;log-&gt;info</code> needs to run through one additional sub and process arguments if required. To verify this overhead (which can be quite noticable in perl) I added a test to the latest release 0.40 (of course based on the core Benchmark module). </p><p> So <i>everyone who wants to help please get it</i> from CPAN or download the tarball and <i>run the benchmark test</i>:</p><p> <code> cpan&gt; look MooseX::Log::Log4perl<br> shell# <b>TEST_MAINT=1 prove -v -l t/99bench.t</b> </code> </p><p> This will give you a Benchmark based comparison, which I'd like to see, and also if the current limits are matched (hence the tests all pass). </p><p> Head over to <a href="http://www.brabbel.net/wp/archives/239">my blog</a> for more info and also preferable add comments there, as I check there more often. </p><p> Hoping for some submissions...</p> Random Logic 2009-05-22T21:08:30+00:00 journal Thoughts on parametrized roles for Moose http://use.perl.org/~Random+Logic/journal/36920?from=rss Moose might allow roles a little bit more freedom on how the are used by allowing parameters to be passed to roles. So the role can use those during initialization to act accordingly. This will allow to e.g. set a method prefix for a role's methods, or set some defaults, initialize some other stuff... Here's how it could look like:<blockquote><div><p> <tt>use Moose;<br>with role 'My::Role'; ### no magic here same as: with 'My::Role';<br>with role 'MooseX::Log::Log4perl' =&gt; ':easy'; ### pass a param<br>with role 'MooseX::Log::Log4perl', prefix =&gt; 'mylog_'; ### pass the param hash/pair to a role</tt></p></div> </blockquote><p>For more on that read <a href="http://www.brabbel.net/wp/archives/94">this post</a>...</p> Random Logic 2008-07-15T22:26:36+00:00 journal Moosifying logging http://use.perl.org/~Random+Logic/journal/36907?from=rss Moose is great, at least the parts that I've discovered so far. It gives a very clean interface for working with OO in perl. <br> After some playing around and discovering the main concepts behind moose and failing to find a logging role using my favorite logging system log4perl I sat down an did a little coding (it is really just a few lines) and uploaded to CPAN as <a href="http://search.cpan.org/perldoc?MooseX::Log::Log4perl">MooseX::Log::Log4perl</a>. If you want to get some more info read it up in my <a href="http://www.brabbel.net/wp/index.php/archives/93">blog...</a> Random Logic 2008-07-14T00:46:36+00:00 journal Did I mention Catalyst is great? http://use.perl.org/~Random+Logic/journal/28676?from=rss <p>It's been a while since the last post. But I had to fiddle a little with java around and complete a software project for my studies, which was based on Catalyst.</p><p>Catalyst is an elegant, simple, thought through framework for building web applictions following the MVC paradigm. And did I mention it's great? </p><p> After diving in into the concept, using the bundled tool (catalyst.pl) to generate a stub webapp, I had a basic but working webapp by just starting script/myapp_server.pl. <br> A little more love was required on the model side, by using DBIx::Class (or lets say the Catalyst Helper for DBIC) to create some more stubs, fill in the fields and primary keys and the relation of the tables. Well, and that's it. Added some more functionality to the controller, of which most is already available as a plugin to catalyst. Now I had some basic actions (every request url is mapped to an action, which actually builds your controller), added the session and authentication plugins and had my first login to my new webapp.</p><p>Only a little more polished was required to the template toolkit templates to actually have a visibile appealing interface. So the rest of the project we spent our time to add tests, some more actions to the controller and some more model classes. All step by step, simple and fun.</p><p>If you haven't heard of Catalyst yet, be sure to check it out at <a href="http://catalyst.perl.org/">catalyst.perl.org</a> or join IRC on irc://irc.perl.org/Catalyst.</p> Random Logic 2006-02-14T11:19:38+00:00 journal Post APW thoughts http://use.perl.org/~Random+Logic/journal/25227?from=rss <p>The APW (Austrian Perl Workshop) in Vienna from 9th-10th of June was great.</p><p>A lot of nice people to meet, a lot of people to meet that make you think you just started to know perl. I still wonder if autrijus ever walks out the door without his laptop (evolution seemed to have topped it here with generating a real code monkey).</p><p>Talks were great, Leo and Chip were able to explain use the future of parrot yet again.</p><p>At least they made me checkout the sources to parrot, maybe I'll do the same with pugs.</p><p>Thanks to all coders, listeners, talkers for coming.</p> Random Logic 2005-06-16T10:20:34+00:00 journal