projects
/
dbsrgits/DBIx-Class.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
changed set_primary_key() to use Tie::IxHash so order of pk's is remembered. this...
[dbsrgits/DBIx-Class.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;