Slash Boxes
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 ]

davorg (18)

Yahoo! ID: daveorguk (Add User, Send Message)

Hacker, author, trainer

Technorati Profile []

Journal of davorg (18)

Monday December 10, 2001
03:49 AM

Varnish and Attributes

[ #1569 ]

It was a weekend of two halves. In the real world, we decided that it was finally time to varnish and seal the wooden floors that were laid in the kitchen and bathroom over six months ago. This involved much moving around of stuff, visits to DIY stores to get the relevant equipment and a horrible solvent smell filling the house for all of Sunday.

In the virtual world it was largely a case of finding lots of little things to do to put off having to write my "Idiotic Perl" talk for the German Perl Workshop. On Saturday afternoon I took a look at muttley's WWW::Amazon::Wishlist module and sent him a couple of patches. On Sunday I took a closer look at Attribute::Handlers, in particular the autotie method for simplifying the tie mechanism. I changed Tie::Hash::Regex, Tie::Hash::FixedKeys and Tie::Hash::Cannabinol to support this interface. Now instead of doing something like:

use Tie::Hash::Regex;
my %hash; tie %hash, 'Tie::Hash::Regex';

You can just use:

use Tie::Hash::Regex;
my %hash : Regex;

Similarly for the others...

use Tie::Hash::FixedKeys;
my %hash : FixedKeys (qw/a list of valid keys/);

And (my favourite):

use Tie::Hash::Cannabinol;
my %hash : Stoned;

Oh, and I converted all of my test scripts to use Test::Simple - It really does make writing test scripts so much easier.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.