Perl Module Archives

Building C and C++ libraries with Perl

It seems that somebody screwed it, and forgot one 20 pages article I wrote for YAPC::EU::2012 proceedings. Therefore, the proceedings are shorter, and are shamelessly incomplete. Anyway, you can read my article in all its glory here. And sooner or later I'll add the presentation too.

More module versioning pain

Yeah, I know, I am always complaining about module versioning. But I think this is something we need to take care when releasing.

This time, it seems that Mail::SPF (JMEHNLE/mail-spf/Mail-SPF-v2.8.0.tar.gz) was indexed by CPAN as v2.8.0, but identifies itself as v2.008. Oh, joy!

CPAN and undef versions (again)

Some time ago I complained that some modules that had a version ended doing it. The problem? I use a lot the 'r' command in the CPAN client to check for outdated modules. Now, I get a lot of failures that are not really failures:

Package namespace         installed    latest  in CPAN file
HTML::Mason::Apache::Request     undef         0  DROLSKY/HTML-Mason-1.47.tar.gz
JSON::PP::Boolean             undef   2.27200  MAKAMAKA/JSON-PP-2.27200.tar.gz
JSON::XS::Boolean             undef      2.32  MLEHMANN/JSON-XS-2.32.tar.gz
JSON::backportPP::Boolean     undef   2.27200  MAKAMAKA/JSON-2…

New Lingua::Identify::CLD

As if I did not have enough modules to take care already, I just started a new one. It is still on its beta version as I did not have much time to test it, and write a decent API. It is available in the usual place:

This is an interface to a library by Google for language detection. As far as I could understand, it is part of the Chrome browser, and was just released as open source. Details here: ="…

Sending Acme::Lisp to Backpan

In 2004 I started an Acme module, to simulate (interpretate) Lisp written as Perl list references. It is completely useless and is just taking space on my CPAN module list.

If anyone has any interest on it, please let me know and I'll hand it off.

But, trust me, you do not want it.

Dancer Recent News (1.3060 and the future 1.3070)

Dancer is moving (or dancing?). There are some news (some more relevant than others) that I would like to share here.

First some less relevant, but nevertheless useful features. Starting from 1.3060 you can access parameters values using a similar syntax with CGI:

   get "/foo" => sub {  my $name = param("name"); };

Not a killer feature, but handy. Also useful, there is an accessor for cookies:

   get "/bar" => sub {  my $cookie_value = cookie "cookie_name";  };

The location and name of the log file can be defined in the configurat…

A good reason not to version submodules.

Probably you do not agree with my point of view, but I think that adding version numbers to sub-modules is, most of the times, counter-productive.

Explaining what I mean by adding version numbers to sub-modules. If I have a module, named Foo::Bar that ships with Foo::Bar::Helper, probably I don't want to add a version to Helper module.

Or if you do, be sure to keep or increment it on every release you do.

Why this matters? Well, it matters to the people who use cpan and the r command t…

Testing on demand on IRIX

I have this module that is failing tests on IRIX only. I do not have any knowledge of IRIX, I do not own an IRIX machine, and I do not want to create new releases of the module printing debug information on tests, so that I can analyze what is going on. This would be kind of tiresome. I needed to create a new release, upload to CPAN and wait for it to be picked by those specific CPAN testers that own an IRIX platform.

Compiling Libraries, part II

In a previous post I wrote about the lack of a Perl module to build standalone C libraries. I suggested the creation of a new module, and I did it. I have my first working code available at github. I am happy to add patches as far as the main objective of the module remains intact.

At the moment I tested it with Mac OS X (Leopard) and Windows (with Strawberry Perl). In both cases, with Perl 5.12.x. So, the Build.PL might be missing a Perl v…

Word counting

There is a Perl module (by coincidence, also Portuguese authored) named Text::ExtractWords that performs more or less the same as the unix command toilet^H^H^H^H^H^Hwc. It returns an hash of words mapping them to their occurrence count.

The module is not bad. It is written in C making it quite fast when compared with Perl code on big strings. Unfortunately, it has a main limitation: unicode. Although it supports a 'locale' configuration parameter, it seems not to affect its behavior regarding unicode characters, that is, looking to them as single ASCII characters.

I do not have…

About Alberto Simões

user-pic I blog about Perl. D'uh!