Re: Inflating and deflating

[prev] [thread] [next] [Date index for 2005/02/05]

From: Perrin Harkins
Subject: Re: Inflating and deflating
Date: 23:42 on 05 Feb 2005
lists@xxxxxxxx.xxx wrote:
>>My problem is that I want to be able to call $object->email( $email )
> 
> with
> 
>>a plain text scalar and have it do the right thing.
> 
> 
> This can be accomplished with triggers, but it is somewhat complex and
> means forgoing the inflate/deflate mechanism. One approach:
> 
> http://groups.kasei.com/mail/arc/cdbi-talk/2004-12/msg00019.html

I did something similar to accomplish this, which I find easier to read 
but still kind of a workaround.  I used the accessor_name sub to give my 
column's accessor a name like "email_value" instead of email.  Then I 
wrote my own email accessor that does exactly what I want and calls 
email_value() for the database reads and writes.

The other way to go would be to make your own version of 
Class::DBI::Relationship::HasA which does what you want.  I think this 
would be an easy change.

- Perrin

Inflating and deflating
Simon Wilcox 19:19 on 05 Feb 2005

RE: Inflating and deflating
22:39 on 05 Feb 2005

Re: Inflating and deflating
Perrin Harkins 23:42 on 05 Feb 2005

Solved // RE: Inflating and deflating
Simon Wilcox 23:17 on 06 Feb 2005

RE: Inflating and deflating
Addison, Mark 11:07 on 08 Feb 2005

RE: Inflating and deflating
Perrin Harkins 16:21 on 08 Feb 2005

RE: Inflating and deflating
Addison, Mark 17:52 on 10 Feb 2005

RE: Inflating and deflating
Perrin Harkins 18:03 on 10 Feb 2005

RE: Inflating and deflating
Addison, Mark 12:40 on 14 Feb 2005

RE: Inflating and deflating
Perrin Harkins 20:19 on 14 Feb 2005

RE: Inflating and deflating
Addison, Mark 17:21 on 15 Feb 2005

Generated at 17:31 on 15 Feb 2005 by mariachi v0.52