At 02:19 AM 3/14/02 +0100, Jenda Krynicky wrote: > > 3) If I bless %self out of the "Tie::Hash" space and into the > > "APC::Event" space, are the "Tie::Hash" functions going to stop > > working? (I assume so.) > >You can't bless a hash, you can only bless a reference. > >What you end up with after your constructor is something like : > > APC::Event=HASH(0x1a7f148) reference >pointing to > a hash >tied to a > Tie::DBI=HASH(0x486454) reference >pointing to > whatever data Tie::DBI needs to store. > >Then > > $obj->Foo() > >calls the APC::Event::Foo() subroutine and > > $val = $obj->{foo} > >calls Tie::DBI::FETCH() subroutine with the >Tie::DBI=HASH(0x486454) reference and 'foo' parameters.
Damian Conway's Regexp::Common module does more or less exactly this. I just finished reading the Perl Conference proceedings on it (yes, in places I am that far behind) and hope to make a full recovery :-) -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]