YAPC::Europe Auction

davorg on 2002-09-20T16:45:37

Through the miracle of #irc, those of us not actually in München were able to join in the YAPC::Europe auction.

Schwern offered an interesting item. He offered to write a test suite for a CPAN module for the highest bidder. This was too good an opportunity to miss so I bid. And won.I'm going to get him to look at Tie::Hash::Cannabinol. That should be fun for him.

It already has a test script. It looks like this:

use Test::Simple tests => 5;

use Tie::Hash::Cannabinol;
$loaded = 1;
ok($loaded);

my %hash : Stoned;

my @keys = qw(one two three four);

@hash{@keys} = 1 .. 4;

ok(1) for 2 .. 5;


Cool module

jdavidb on 2002-09-20T17:40:43

I wanted to do this years ago to a BASIC program I once had. (It didn't use hashes; it did a linear search with a string comparison for each entry.)

Can't seem to get this to work, though.

> perl5.8.0 -c /usr/local/perl580/lib/site_perl/5.8.0/Tie/Hash/Cannabinol.pm
Bareword "__CALLER__::Stoned" not allowed while "strict subs" in use at /usr/local/perl580/lib/site_perl/5.8.0/Tie/Hash/Cannabinol.pm line 39.
/usr/local/perl580/lib/site_perl/5.8.0/Tie/Hash/Cannabinol.pm had compilation errors.

Re:Cool module

jdavidb on 2002-09-20T17:49:41

Seems to be a 5.8.0 issue with Attribute::Handlers.