use warnings;
use DBIx::Class::ResultSet;
+use Data::Page;
use base qw/Class::Data::Inheritable/;
$attrs = { %{ pop(@_) } };
}
$attrs->{where} = (@_ == 1 || ref $_[0] eq "HASH" ? shift: {@_});
-
+
my $rs = $class->resultset($attrs);
-
+
return (wantarray ? $rs->all : $rs);
}
sub find_or_create {
my $class = shift;
my $hash = ref $_[0] eq "HASH" ? shift: {@_};
- my ($exists) = $class->search($hash);
+ my $exists = $class->find($hash);
return defined($exists) ? $exists : $class->create($hash);
}
=head1 AUTHORS
-Matt S. Trout <perl-stuff@trout.me.uk>
+Matt S. Trout <mst@shadowcatsystems.co.uk>
=head1 LICENSE