[CDBI] Scope of autoupdate/update?

Christopher H. Laco claco at chrislaco.com
Tue Aug 2 21:48:49 BST 2005


William Ross wrote:
> Custom inflation method?
> 
>   Handel::Cart->has_a(thing => 'My::Artist',
>     inflate => 'inflate_without_autoupdate',
>   );
> 
> and in your base class, something like:
> 
>   sub inflate_without_autoupdate {
>     my ($class, $id) = @_;
>     my $self = $class->_simple_bless($id);
>     $self->autoupdate(0);
>     return $self;
>   }
> 
> but I haven't ever needed to do this, nor tested any of the above :)
> 
> will
> 
> 

Huh. That would work. Although it's more at the definition level of
things. In my case, it would only happen during the inflate during AxKit
usage, but not for normal perl usage.

Then again, maybe it's just a matter of rearranging the code that the
taglib spits out.

I wonder if creating a seperate has_a would be evil?

Handel::Cart->items gets me the normal items decalred by the package..
Handel::Cart->nonupdate_items gets me the items with the special
inflation that turns off autoupdate...

-=Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3178 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.digitalcraftsmen.net/mailman/private/classdbi/attachments/20050802/57c5a317/smime.bin


More information about the ClassDBI mailing list