1 package # hide from PAUSE
2 DBIx::Class::CDBICompat::Constructor;
7 use base 'DBIx::Class::CDBICompat::ImaDBI';
10 use DBIx::Class::_Util qw(quote_sub perlstring);
12 __PACKAGE__->set_sql(Retrieve => <<'');
18 my ($class, $method, $fragment) = @_;
20 croak("constructors needs a name") unless $method;
22 carp("$method already exists in $class") && return
23 if $class->can($method);
25 quote_sub "${class}::${method}" => sprintf( <<'EOC', perlstring $fragment );
27 $self->sth_to_objects($self->sql_Retrieve(%s), \@_);