projects
/
dbsrgits/DBIx-Class-Historic.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
23ff2ed328860adaa78f55d0cf59815ba11e7616
[dbsrgits/DBIx-Class-Historic.git]
/
lib
/
DBIx
/
Class
/
CDBICompat
/
Convenience.pm
1
package DBIx::Class::CDBICompat::Convenience;
2
3
use strict;
4
use warnings;
5
6
sub find_or_create {
7
my $class = shift;
8
my $hash = ref $_[0] eq "HASH" ? shift: {@_};
9
my ($exists) = $class->search($hash);
10
return defined($exists) ? $exists : $class->create($hash);
11
}
12
13
sub retrieve_all {
14
my ($class) = @_;
15
return $class->retrieve_from_sql( '1' );
16
}
17
18
1;