Reviews by David Garamond



Perl6-Say (0.16) **

Ok, it's not 2004 anymore, I suggest we retire or start to deprecate this module? This module now requires Perl 5.8, and Perl 5.10+ has "say" built in, so basically this is a module specifically for 5.8 *only*.

Data-Rmap (0.62) *****

I was looking for a simple way to transform all DateTime objects in my data structure into string (e.g. "2010-07-06"). After failed experiment with Data::Walk and dumping Data::Transformer due to unsightly interface, I found Data::Rmap. It's straightforward to choose.

My only complaint would be the name: it's not immediately searchable (I was searching for 'data modify', 'data walk', 'data traverse', 'modify data inplace', and the like). Also, the name "map" suggests that the function will return a copy of the data (like Perl's builtin map) instead of modifying inplace.

Data-Walk (1.00) ****

Nice interface (the analogy to File::Find certainly helps) and very straightforward to use, but one thing I can't do is modify the data inplace. I spent about an of hours trying to make Data::Walk do inplace modification, but finally gave up and use Data::Rmap instead.

Data-Transformer (0.04) **

Frankly, I don't like the interface. I suspect most people would like to just specify one callback function instead of one for each type. Also I don't like having to work with $$_ ($_ should perhaps be aliased to the real data). As the Data::Transformer's POD also said, those looking for alternatives can checkout Data::Walk and Data::Rmap, which I recommend instead.

Data-Traverse (0.03) **

I find the interface rather unintuitive, because I expect data to be in $_ (instead of type). For those looking for alternatives, see also Data::Walk (which provides breadth-first as well as depth-first) and Data::Rmap (which provides inplace modification).

Regexp-Grammars (1.002) ****

Parse::RecDescent is dead. Long live Regexp::Grammars!

As Damian himself has said/presented, RG is the successor for the popular PRD.

The docs of RG is not as complete (yet) as PRD's.

The PRD grammar syntax is also nicer/cleaner (due to RG having some restrictions because you are writing your grammar inside a regex).

RG doesn't (yet) have some of the features of PRD, like <leftop> and <rightop>. But it does have most of the features, and add a few of its own.

RG performs significantly faster than PRD.

In general, whenever you consider PRD to be a good candidate of tool to solve your problem, consider using RG.

But you need Perl 5.10+ to use RG, as it depends on regex features not found in older Perl.

Parse-RecDescent (1.965001) ***

Responding to previous comment from MB: "Have you the time to do this Damian?" The answer is yes, in the form of Regexp::Grammars, which Damian said himself is the successor of Parse::RecDescent.

To give credit to this module, PRD is very featureful and easy to use, it's very convenient to generate parsers, and the docs is quite complete. The only problem with it is, as many have pointed out, speed.

It is *seriously* slow, with parser generation can take up to half a second on my laptop with a moderate grammar (200-400 lines) and parsing can take seconds even minutes for a moderately long string. It is orders of magnitude slower than other parsers. Do think a few times before deciding you can take the performance hit of PRD.

For alternatives, try Regexp::Grammars. (Or Parse::Yapp or Parse::EYapp, as other reviewers have written.)

Test-Seperate (0.002)

Sorry, just commenting the name, shouldn't it be Separate?

File-Size (0.06) **

Frankly I prefer the name and interface of Filesys::DiskUsage. Sadly, despite the docs mentioning "blocks", this module doesn't really count block usage like the Unix "du" command, because it doesn't take multiple hard links into account.

Even more sadly, Filesys::DiskUsage doesn't either.

I guess I'll have to do with 'system "du $file"' command for now.

DateTime (0.50) *****

*THE* definitive date/time handling module in Perl (and even maybe in all major programming languages). Can't believe I went through all the pain of reinventing the wheel, and using various date/time modules of various quality & interface. If only I had known DateTime earlier.

Look no more, DateTime it is.

Data-Rx (0.001) *****

I've been mulling over writing this kind of module (planning to call it Schema::Nested or something), but never got around to do it. Thankfully somebody stepped up and did it! Keep up the good work, will be looking forward to future releases (especially i'm hoping for some subclassing mechanism, for better reuse of schemas).

DBI-Mysqlsimple (0.02) *

I agree with the previous reviewer. IMO, overall this module is not necessary. Plain DBI is actually simple enough for simple cases. Maybe the author of Mysqlsimple did not realize this. Let's compare:

* Retrieving a single row:
Mysqlsimple: my ($v1,$v2) = $db->get_row("select v1,v2 from table");
DBI: my ($v1, $v2) = $dbh->selectrow_array("select v1,v2 from table");

* Retrieving a single row (with params):
Mysqlsimple: my ($v1,$v2) = $db->get_row("select v1,v2 from table where cond1=? and cond2=?", [$cond1,$cond2]);
DBI: my ($v1,$v2) = $db->selectrow_array("select v1,v2 from table where cond1=? and cond2=?", {}, $cond1,$cond2);

* Retrieving all rows with params:
Mysqlsimple: my $rows = $db->get_rows(..., [$param1, $param2]);
DBI: my $rows = $dbh->selectall_arrayref(..., {}, $param1, $param2);

* do() with params:
Mysqlsimple: my $rows = $db->do(..., [$param1, $param2]);
DBI: my $rows = $dbh->do(..., {}, $param1, $param2);

As you can see, the differences are minimal.

Carp-Always (0.09) *****

Modules like this deserve to be more well-known and should perhaps included in core Perl (or even become a command-line switch). I'm never comfortable with Carp and all the "complexity" of using it. What I wanted is simple, when debugging I want all die()'s (and perhaps warn() too, but much less often) to print a stack trace.

Call me inflicted with Ruby- or Python-envy, but it's been so ridiculous wanting to print out stack traces in Perl. I don't want to have to change/rewrite all my die()'s to croak() or confess()! And what about library codes which use die()?

Thank God somebody wrote Carp::Always.

Data-Dump (1.08) *****

I've envied Ruby users which can use just "p" to print out data structures instead of us which used to have to do 'use Data::Dumper; print Dumper(...);'. And even then there's this '$VAR1 = ' garbage which 99% of the time is not wanted. Which often makes me wonder, shouldn't P in Perl stand for Practical?

With Data::Dump we're still a bit behind but closer. One rant is the with the doc: the pp() function should perhaps be advertised more prominently, since I suspect that's what most users want most of the time.

V (0.13) *****

What a nice little module. It is by far the easiest to review ;-)

I have been using my own little script called "pmversion" which serves the same exact purpose. I guess I'll be using V from this moment on. It's amazing doing something as basic as showing a module's version had not been this easy or even easier.

Test-Unit (0.25) ****

Test::Unit is of course a fine module. But if you are shopping around for testing framework, I recommend you try Test::Class instead, which combines the best of two worlds. First, you get xUnit style, but I think with a slightly simpler interface. Second, you get to use all the standard Perl testing stuffs like Test::Simple, Test::More and Test::Harness. This is better because it's what most Perl modules use (so you might be more familiar with it if you're a Perl programmer), plus there are more kinds of "assert" functions in Test::More and friends compared to Test::Unit::Assert.

Module-Build (0.2808) ***

Here's the short story: first there's Exutils::MakeMaker, which requires make and hard to extend, but everybody uses it due to lack of alternatives. Then came Module::Build which is pure perl and easier to use for authors, but breaks compatibility. Users can no longer use the 'perl Makefile.PL && make && make install' mantra. Plus, it used to not support PREFIX. Plus, MB-based modules require MB which is not by default installed. This pisses *a lot* of people.

Lesson to learn: maintaining backward-compatibility is very important, especially for end users. I think the intention of MB is a good one, but the execution could be a bit better. For example, perhaps the "Build.PL" script could've still just been named "Makefile.PL", couldn't it?

I recommend people shopping for a module installer to look at Module::Install instead. MI is a middle ground between Eu::MM and MB. It's pure perl and easy to extend but it also allows users (and et al) to install modules the old way. It embeds a copy of itself in every MI-based modules, so there's no depedency hell. Best of both worlds.

YAML-LibYAML (0.26) *****

It's about time Perl gets a complete and proper YAML parser. This is it. In the past I've been bitten by a couple of YAML's and YAML::Syck's minor bugs, in addition to several crashes (don't know how they are recently). But using YAML::XS (YAML-LibYAML) I get the feeling, for the first time, of a first class parser comparable in stability and completeness to that in Ruby and Python.