Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

BooK (2612)

BooK
  {book} {at} {cpan.org}
http://paris.mongueurs.net/
Yahoo! ID: philippe_bruhat (Add User, Send Message)

Obfuscation [plover.com]. Pink [axis-of-aevil.net]. HTTP::Proxy [cpan.org]. YEF [yapceurope.org]. Fishnet [perl.org]. Kapow [cpan.org]. Cog's [perl.org] bitch [cpan.org]. Invitation [perl.org]. White [perl.org] Camel [perl.org]. Nuff' said.

Journal of BooK (2612)

Wednesday October 18, 2006
03:15 PM

New module SVN::Dump

I've just uploaded a new module on CPAN, which is called SVN::Dump . The goal is to be able to read one or several dumps produced by the command svnadmin dump, modify them and then writing them back to file or to svnadmin load so as to perform useful tricks.

The tricks I have in mind include:

  • chronologically reorder revisions when the repository is the result of merging of several distinct repositories (I heard that when doing an svn update {DATE}, svn actually does a binary search on the revisions, assuming they are in chronological order)
  • do various filtering tricks (with the power of Perl and not just prefixes, as does svndumpfilter)
  • directly merging several repository into one while keeping the chronological order of the revisions
  • etc.

Some of these things should be possible to do directly to the stream coming from svnadmin dump but others will require several dumps and probably several passes. So the SVN::Dump::Index and the SVN::Dump::TranslationTable modules may not be far away...

The module is very alpha at the moment: I hated myself for the interface when I wrote the two examples included in the distribution. ;-)

Everything is subject to change, and feedback is very welcome.

Saturday September 02, 2006
01:17 PM

Auctioning body parts

About two years ago, after the so-called "fishnet incident", I wrote in my journal:

(And I'm scared that body modification may be the winner in 2009.)

We are actually getting closer to this. This year, I auctioned the surface of my arms in the following terms:

At every Perl conference that I'll attend in 2007, I'll (temporarily) tattoo the name of your favorite module on my arms.

José (cog) actually bought the space of my two arms for only £30. It's damn cheap!!!

We have spent the day after the conference using the hotel bandwidth for hacking stuff (with root and ambs), and we've also discussed our options:

  • one very long module name going from one hand to the other (some of the tattoo being on my shoulders too)
  • two modules, one on each arm
  • the module name on one arm, and the source code on the other arm (possibly in a very tiny font)
  • ... he keeps getting new ideas as I type this! I'm starting to be scared.

You'll see what we agreed upon at the conferences I'll attend in 2007... The list currently includes YAPC::Europe and the French Perl workshop.

Sunday August 06, 2006
03:39 PM

Permanent invitation, if you're passing through Lyon

(This is an entry I've wanted to write for a while, but never took the time to.)

In the last few years, my wife and me have had the pleasure to be invited for dinner/lunch by several Perl mongers, when we were visiting their countries. It's always been a pleasure to meet them (and their families), when we were half lost in a foreign country. This added a very personal and friendly touch to several of our holiday trips (in Ireland, Italy and Denmark so far).

This Saturday, we had a French mongueur passing by with his wife and kids for dinner (they were on their way back from holidays). Such evenings are always nice, and I realised that if I want more, I have to let the world know.

Therefore, if you are a Perl monger passing by Lyon someday, drop me an email to let me know. I'd love to meet you up for a beer or dinner (in a local restaurant or at my place).

Monday April 17, 2006
04:25 PM

Giving up maintainership for Games::Golf

I've finaly removed everything related to Games::Golf from CPAN/PAUSE (except BackPAN, obviously). I just removed primary and co-maintener right from me and the other people involved.

We stopped working on that module on October 2002, so it really was about time! (I really doubt someone is going to fill that slot anytime soon, but I felt I had to do it anyway.)

Friday April 14, 2006
10:14 AM

RT spam

I've recently received several spams through bug-$disto@rt.cpan.org... Is there any way to avoid this? (and to remove those from the queue without sending a reply to the spammer).

Spammers, you already rendered mail unusable (at least without massive added protection), do you really have to break all our other tools as well?

Tuesday January 10, 2006
10:51 AM

Net::Proxy

After toying with the idea during most of the holidays, and going through various class hierarchies and implementation scenarios, I finaly managed to have a working implementation of Net::Proxy. (As you'll see, it's not related to HTTP::Proxy, except for the name similarity.)

Net::Proxy introduce the concept of connectors (implemented as Net::Proxy::Connector objects). A Net::Proxy object is made of an in connector waiting for incoming connections on the proxy and an out connector that contacts a remote host. The proxy passes data back and forth between the sockets managed by the connectors.

These connectors let me abstract various encapsulation protocols on top of regular sockets. The first one is the classic HTTP CONNECT, already implemented in my connect-tunnel script (which I've rewritten using Net::Proxy and included in the distribution). Other connectors will follow.

As an added bonus, this all works perfectly under Win32. And the test suite covers about 93% of the code!

Monday November 28, 2005
08:07 AM

Acme::MetaSyntactic: we're halfway through!

This morning I released Acme::MetaSyntactic 0.50. I decided to put out what is probably going to be the biggest theme ever, and also the first theme whose items are computed directly by Perl itself (and therefore depend on the version of Perl running it).

Let me introduce this week's theme, Acme::MetaSyntactic::unicode, which has 16327 items in Perl 5.8.7, 15076 in Perl 5.9.2 and 10538 in Perl 5.6.1. None of them in Acme::MetaSyntactic's source code.

I actually postponed Acme::MetaSyntactic::pauseid to a later date, in favor of AMS::unicode, so that I do not have to update the theme every week with 10 or more id... (You know, lazyness and all.)

Thanks to Abigail, I've got enough themes to continue at least until 0.80, so I'm now quite confident that I'll reach version 1.00 without difficulties. The only problem being that I intend to have 100 themes in 1.00, and I already have 56 in version 0.50...

Anyway, there are only a handful of slots left, so if you want to grab half a minute (or less) of fame, just send me your theme proposals. Lists and code for automatic update appreciated (see Acme::MetaSyntactic::RemoteList and Acme::MetaSyntactic::dilbert for an example).

Monday October 03, 2005
03:14 AM

CPANTS: the numbers mean nothing, but I had to brag...

Slosh!!! I'm first at the CPANTS game with a whooping 17.375!! And I owe it all to Acme::MetaSyntactic! (well, also to HTTP::Proxy and Regexp::Log, but I like to think all my hard work with stupid stuff paid off after all...)

The 18th point is the hardest to get (the module must be a prerequisite for a module by another author), and it also means that if I upload a new module (with a score of 17), my total score will (gasp!) drop to 17.3333333333333 and I'll be first ex-aequo with KIMRYAN.

So it's probably the end of my CPAN career... ;-)

OK, these numbers do not mean much anyway; but I'm still first, niah niah niah... (who knows how long it'll last anyway? I should profit while I can...)

Thursday June 30, 2005
11:50 AM

FREE assertions

I'm working on a complicated piece of code for a client, and I really have to put extra attention to the code I'm writing. It's relatively difficult to come up with a test data to check everything, but I can at least ensure I give the modules enough data to cover most of the code.

To make a long story short, I want to have assertions and enable them only in some tests.

package MyModule;
BEGIN { *__ASSERT__ = $main::__ASSERT__ ? sub () { 1 } : sub () { 0 }; }

sub routine {
    my ($self, %args) = @_;
    ...
    if( __ASSERT__) {
        die "\$kayo is '$kayo' and not 'whap'"
           unless $kayo eq 'whap';
    }
    ...
}

Now I only have to write:

BEGIN { our $__ASSERT__ = 1; }
use MyModule;

And the assertion code is enabled. Otherwise it's optimized away (don't forget the prototype as I first did, otherwise the __ASSERT__() method will always be called). Assertions for FREE! NO extra code when we don't want them (which is most of the time) and NO runtime penalty.

And I can even verify this very assertion, thanks to Data::Dumper recent power upgrade:

$ perl -MData::Dumper -MMyModule -e '$Data::Dumper::Deparse = 1; print Dumper \&MyModule::routine'
$VAR1 = sub {
            package MyModule;
            my($self, %args) = @_;
            ...
            '???';
            ...
}

Tuesday March 29, 2005
07:53 PM

Play the kwalitee game

On monday morning I discovered my kwalitee rating (14.2857142857143 for 7 modules) and that I ranked 25th among the authors of more than 5 modules.

I've quickly upgraded all my modules (but one) to the level of kwalitee 16, and ta-da! I've now jumped to rank 7 (15.7142857142857 for the same 7 modules). The next release of HTTP::Proxy should have 16 kwalitee as well, so that I can join SAPER and CLACO (and probably a few others by next week) up there at the top.

The hardest kwalitee point to get is is_prereq (the module needs to be a prerequisite for at least 3 others modules not by the same author). However, since I have a module which is already a prerequisite for two other modules, I just need to advertise that module a little bit more, so that others will use it as well.

The only tiny little problem with that plan is that the module in question is... Acme::MetaSyntactic! Aiieee!! Holy catastrophe!!! (It is a prerequisite for Bot::MetaSyntactic and Acme::MetaSyntactic::RefactorCode)

Well, even though HTTP::Proxy is also a prerequisite for two modules (HTTP::Proxy::BodyFilter::Adnix and HTTP::Recorder::Httperf), and Regexp::Log for one module (Regexp::Log::Common), I am pretty sure that Acme::MetaSyntactic is the one module that will earn me that 17th kwalitee point.