find_related now does search_related->find
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Retrieve.pm
index 31dd128..3259bb2 100644 (file)
@@ -3,8 +3,11 @@ package DBIx::Class::CDBICompat::Retrieve;
 use strict;
 use warnings FATAL => 'all';
 
-sub retrieve          { shift->find(@_)            }
-sub retrieve_all      { shift->search              }
+
+sub retrieve  {
+  die "No args to retrieve" unless @_ > 1;
+  shift->find(@_);
+}
 
 sub retrieve_from_sql {
   my ($class, $cond, @rest) = @_;
@@ -12,6 +15,7 @@ sub retrieve_from_sql {
   $class->search_literal($cond, @rest);
 }
 
+sub retrieve_all      { shift->search              }
 sub count_all         { shift->count               }
   # Contributed by Numa. No test for this though.