Broken Modules (Fixed)

davorg on 2002-09-23T19:25:03

So, within a few hours of me posting my last journal, Arthur Bergman the maintainer of Attribute::Handlers pops up on IRC and offers to help track down my problem. It seems that the parsing of the use Attribute::Handlers line has changed subtley in Perl 5.8.0. Whereas

use Attribute::Handlers autotie => { __CALLER__::Foo => __PACKAGE__ };

used to work, now you need to do

use Attribute::Handlers autotie => { "__CALLER__::Foo" => __PACKAGE__ };

New versions of Tie::Hash::Regex, Tie::Hash::FixedKeys and Tie::Hash::Cannabinol are on their way to CPAN right now. Documentation patches to A::H will follow.

Stop Press: As I'm writing this entry, Arthur tells me that what I actually need is:

sub import { 
  Attribute::Handlers->import(autotie
                                => { "__CALLER__::FixedKeys" => __PACKAGE__ }) 
}

as the original interface only works for the first package to use Tie::Hash::Foo. I'll leave that update for another day :)