Renamed DBIx::Class::PK's retrieve() as find()
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Constructor.pm
CommitLineData
a3018bd3 1package DBIx::Class::CDBICompat::Constructor;
2
3use strict;
4use warnings;
5
6sub add_constructor {
7 my ($class, $meth, $sql) = @_;
8 $class = ref $class if ref $class;
9 no strict 'refs';
10 *{"${class}::${meth}"} =
11 sub {
12 my ($class, @args) = @_;
656796f2 13 return $class->search_literal($sql, @args);
a3018bd3 14 };
15}
16
171;