discard_changes is also "refresh from storage"
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / CDBICompat / Constructor.pm
CommitLineData
c0e7b4e5 1package # hide from PAUSE
2 DBIx::Class::CDBICompat::Constructor;
a3018bd3 3
4use strict;
5use warnings;
6
7sub add_constructor {
8 my ($class, $meth, $sql) = @_;
9 $class = ref $class if ref $class;
10 no strict 'refs';
11 *{"${class}::${meth}"} =
12 sub {
13 my ($class, @args) = @_;
656796f2 14 return $class->search_literal($sql, @args);
a3018bd3 15 };
16}
17
181;