select trigger and warnings
[prev]
[thread]
[next]
[Date index for 2004/11/16]
Hi all, I'm hoping someone can give me a hand.
I'm storing ip addresses as decimal numbers in a DB and have set up
triggers that do the address-to-decimal conversion each time the records
are accessed/stored, so I have:
Ipblock->add_trigger( deflate_for_create => \&ip2int );
Ipblock->add_trigger( deflate_for_update => \&ip2int );
Ipblock->add_trigger( select => \&int2ip );
These methods do some calculations and set the value using
$self->address($value).
This seemed to do exactly what I wanted, except that now everytime I
query an Ipblock object (just for reading), I get the warning:
Ipblock Ipblock=HASH(0x953e1e8) destroyed without saving changes to
address at...
Which I would prefer to avoid. Am I doing the wrong thing? Or is there
some way around this particular warning?
Thanks in advance,
cv
|
select trigger and warnings
Carlos Vicente 18:43 on 16 Nov 2004
|