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

Matt S Trout dbix-class at trout.me.uk
Fri Nov 4 18:06:04 GMT 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/ +




More information about the ClassDBI mailing list