Roma.pm wishes good holidays

polettix on 2007-08-02T17:52:28

Yesterday we got together, at last! Happy partecipants were (in no particular order) Aldo, Chris, Marco, Stefano, Emanuele and I. Ok, there was a particular order, but nevermind.

We usually try to stay far away from Perl in these Mongers meetings, but we always fall down. Yesterday we had an interesting conversation about 'use vars' and 'our', with Emanuele being an advocate for 'our' (and citing the docs for 'use vars' being deprecated) and Aldo and I saying that 'our' was out of the 1337 clubs. Well, 'saying' is not completely true: we had that we-know-it-all-baby look and voice tone, but Emanuele is no baby at all and quickly disarmed us with the simplest of questions ("where did you read this? gimme references, and good ones!") and citing passes from the documentation at heart.

The bottom line is that neither Aldo nor I found the references we were thinking about, apart from a couple of rants by tilly on Perl Monks and a tutorial from Ovid. But I can swear that it was all Weisbeer's fault.

Marco was amazed by the simplicity of the Perl object system, which we tried to explain briefly. Thinking about it, I must admit that building an entire object system on more or less two user-tweakable things (bless and @ISA) is really *great*. Whatever the object system for Perl 6 will be :)

After what we can consider my first truly technical dinner in Perl, we found that we were hostage in the restaurant, but fortunately we had eaten enough to gain the possibility to get out (you have to spend a minimal amount of money in that place, it seems).


Two points

Aristotle on 2007-08-03T03:32:05

  1. Using “our” will make your code incompatible with old perls.

  2. File-scoped “our” is OK, but lexically scoped “our” is bad; see Ben Tilly’s rant.

Note that if you only need to change a few globals once (eg. set up @ISA and $VERSION when your class is loaded), then you can simply move those bits above the “use strict” line. Then you need neither “our” nor “use vars”.