[Dbix-class] using DBIx::Class::CDBICompat

John Goulah jgoulah at gmail.com
Mon May 21 22:19:05 GMT 2007


I've read the cpan info on DBIx::Class::CDBICompat, but cant seem to get an
actual working example going.  In particular I want the sth_to_objects
method, which I believe is in the ImaDBI component. I'm perhaps complicating
things further by loading the  ResultSetManager component so that I can
execute and return a result set in my object.  I've tried making CDBICompat
the base class, and also loading as a component.

So I have a function like:

sub get_some_data : ResultSet {
    my ($self) =3D @_;
    my $dbh =3D $self->result_source->schema->storage->dbh;

    my $sth =3D $dbh->prepare("select * from sometable");
    $sth->execute();

    ##### this doesn't work, how do I  use this method?
    return $self->sth_to_objects($sth);
}
*


Thanks!*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070521/0f2=
3ff7a/attachment.htm


More information about the Dbix-class mailing list