Audio::XMMSClient::XMLRPC
I just uploaded Audio::XMMSClient::XMLRPC 0.01 to the CPAN. It's basically an XMLRPC interface to the xmms2 daemon. It ties all Audio::XMMSClient functions except for the signal and broadcast stuff to an XMLRPC API which is quite similar to the Perl API of Audio::XMMSClient.
It will be available from from CPAN in some hours and can be grabbed from the Pause incoming queue in the meantime.
Plat_Forms: The web development platform comparison
Plat_Forms is an international programming contest. It aims at comparing different technological platforms for developing web-based applications: Java EE, .NET, PHP, Perl, Python, Ruby-on-Rails
I really love the idea behind that project and after some Perl people complained they now also accept submissions from Perl developers. So if you live in or around Germany and would like to do some propaganda for your favorite web framework, apply right now, as long as your favorite web framework is based on Perl. :-)
Perldition, a small Blog and CMS, written in Perl
Until a few days ago my website was driven by PodCMS, which allowed me to manage all of the content as directories and files containing Pod (Plain Old Documentation). Unfortunately that wasn't quite flexible enough and didn't allow some features, like comments, tags and trackbacks, to be implemented easily. Also Pod sucks for some sort of content, as there's no satisfying Pod2Html module on CPAN as it seems.
Therefor I decided to create something new. The new system has all features the old one had, but now allows to create content in lots of formats such as:
- Pod
- Markdown
- Sbc
- Textile
- HTML
Other markup formats are possible as well, as the API for the formatting plugins is quite easy and usually just a thin wrapper around a CPAN module which does the actual translation to HTML.
Beside allowing new formats to write the content in, it also adds the following features:
- Comments
- Tags
- RSS feeds for comments and tags
- Trackbacks
- Pingbacks
- MoveableType API
- Manage static pages in an easy, tree-like fashion
- An easy web interface for editing everything. No need to work with files and directories anymore.
- Uses a relational database and is portable between many of them through DBIx::Class (I developed it using SQLite and deployed it on PostgreSQL)
In conclusion I'm pretty happy with the new software. I'm just very disappointed by quality of the generated HTML that the various Pod2HTML modules on CPAN produce, so I'll probably end up in writing something myself, based on Pod::Parser.
PS: The URL to rss feed changed. Please use http://perldition.org/blog.rss.
Linux::Sysfs and ExtUtils::Autoconf
I recently wrote two two new Perl modules. The first is called Linux::Sysfs and is a library binding for libsysfs. It offers a convenient interface to sysfs (/sys). After releasing the first version of it for peer review and, later on, to CPAN, I received a lot of reports about test failures because of a missing or outdated libsysfs.
Therefor I wished to have something like GNU autoconf for Perl modules. It would be possible to write something similar in pure Perl (someone actually tried it: Config::Autoconf), but compiling C programs from Perl in a portable way isn't much fun.
Therefor I decided to write some Perl glue around autoconf and autoheader so those tools are easy to use from Makefile.PLs and such. I did so and the result is ExtUtils::Autoconf. It'll be on CPAN within the next few hours. Until then the current version is available from here.
It currently has some documentation about using it from an ExtUtils::MakeMaker-based Makefile.PL. Instructions about how to use it with Module::Build and Module::Install are still missing.
The Module::Install part will be done by an extension called Module::Install::Autoconf, which I'm currently about to write. For the Module::Build part I don't really have an Idea on how to do that, so any help from some Module::Build people would be very appreciated.
Class::DBI is dead
David, you wrote about Class::DBI performance.
Even without benchmarking you could have found out, that Class::DBI is quite slow. Fortunately there are some alternative object-relational mappers available in the perl universe. The best ones I found so far are Rose::DB::Object and DBIx::Class. I took a closer look at both and would like to share my experience.
As this shows, RDBO is faster than DBIC in most of the case. The generated SQL doesn't differ too much and therefor it must be the perl side of things that makes the difference.
Matt S Trout <dbix-class@trout.me.uk> says:
However, RDBO achieves its perl speed by aggressive inlining of stuff etc. - for example the main object retrieval function in RDBO's manager class is >3000 lines in a single sub. DBIC values extensibility over a few extra sub calls, so methods are much more broken out and there are many more ways to hook into the DBIC execution process to extend.
Also its idea of resultsets is something I really love. Here's a small example to illustrate that:
my $user_rs = $schema->resultset('User')->search({ registered => 1 }); $user_rs = $user_rs->search( { comment.title => 'Foo' }, { join => { 'article' => 'comment' }, order_by => 'user.name', }, ); # no sql executed yet. # now you can use your resultset as an iterator or query a list # of User objects from it or .. while (my $user = $user_rs->next) { ... } # or my $count = $user_rs->count;
Using these resultset makes it extremely easy to built up queries piece by piece and to work together well with, for example, a templating system. You don't need to fetch all row-objects and give them to your template. You can just pass the iterator to the template library.
There's a lot more to say about this two object-relational mappers (for example RDBO supports prefetching of multiple one-to-many at once, which DBIC doesn't), but maybe you just should take a look yourself. I personally prefer DBIx::Class for its vast extensibility.
Last modified: 2007-10-18 (木) at 12:37 am