MooseX::Log::Log4perl 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
$self->log->info 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).
So everyone who wants to help please get it from CPAN or download the tarball and run the benchmark test:
cpan> look MooseX::Log::Log4perl
shell# TEST_MAINT=1 prove -v -l t/99bench.t
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).
Head over to my blog for more info and also preferable add comments there, as I check there more often.
Hoping for some submissions...
with role 'My::Role'; ### no magic here same as: with 'My::Role';
with role 'MooseX::Log::Log4perl' => ':easy'; ### pass a param
with role 'MooseX::Log::Log4perl', prefix => 'mylog_'; ### pass the param hash/pair to a role
For more on that read this post...
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.
Catalyst is an elegant, simple, thought through framework for building web applictions following the MVC paradigm. And did I mention it's great?
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.
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.
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.
If you haven't heard of Catalyst yet, be sure to check it out at catalyst.perl.org or join IRC on irc://irc.perl.org/Catalyst.
The APW (Austrian Perl Workshop) in Vienna from 9th-10th of June was great.
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).
Talks were great, Leo and Chip were able to explain use the future of parrot yet again.
At least they made me checkout the sources to parrot, maybe I'll do the same with pugs.
Thanks to all coders, listeners, talkers for coming.