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 ]

davorg (18)

davorg
  dave@dave.org.uk
http://dave.org.uk/
Yahoo! ID: daveorguk (Add User, Send Message)

Hacker, author, trainer

Technorati Profile [technorati.com]

Journal of davorg (18)

Friday September 20, 2002
11:45 AM

YAPC::Europe Auction

[ #7866 ]

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;

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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.

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • Seems to be a 5.8.0 issue with Attribute::Handlers.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers