select trigger and warnings

[prev] [thread] [next] [Date index for 2004/11/16]

From: Carlos Vicente
Subject: select trigger and warnings
Date: 18:43 on 16 Nov 2004
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

Re: select trigger and warnings
Tony Bowden 11:01 on 17 Nov 2004

Re: select trigger and warnings
Carlos Vicente 01:49 on 18 Nov 2004

Re: select trigger and warnings
Carlos Vicente 00:34 on 19 Nov 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52