1 package # hide from PAUSE
2 DBIx::Class::CDBICompat::Constructor;
8 my ($class, $meth, $sql) = @_;
9 $class = ref $class if ref $class;
13 $attrs{rows} = $1 if $sql =~ s/LIMIT\s+(.*)\s+$//i;
14 $attrs{order_by} = $1 if $sql =~ s/ORDER BY\s+(.*)//i;
16 *{"${class}::${meth}"} =
18 my ($class, @args) = @_;
19 return $class->search_literal($sql, @args, \%attrs);