Re: [CDBI] Call a has_a rel's inflate/deflate method explicitly.

[prev] [thread] [next] [Date index for 2005/11/04]

From: Matt S Trout
Subject: Re: [CDBI] Call a has_a rel's inflate/deflate method explicitly.
Date: 18:06 on 04 Nov 2005
On Fri, Nov 04, 2005 at 11:51:24AM -0600, Peter Speltz wrote:
> Does anyone know how to call the Infate or deflate method setup for a
> HasA rel. explicitly?
> 
> I want to say something like
> 
> $meta = $self->meta_info(has_a => $col);
> my $coderef = $meta->{deflate};
> my $obj = $self->$col;
> my $deflated = &$coderef($obj);

Looking at _deflated_column,

$meta->args->{deflate};

should do the trick.

        -- 
             Matt S Trout       Specialists in Perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

Re: [CDBI] Call a has_a rel's inflate/deflate method explicitly.
Matt S Trout 18:06 on 04 Nov 2005

Generated at 20:55 on 09 Nov 2005 by mariachi v0.52