Remove Class::Data::Inheritable and use CAG 'inherited' style accessors
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Retrieve.pm
index 564583a..2ddd4b2 100644 (file)
@@ -2,8 +2,13 @@ package # hide from PAUSE
     DBIx::Class::CDBICompat::Retrieve;
 
 use strict;
+
+# even though fatalization has been proven over and over to be a universally
+# bad idea, this line has been part of the code from the beginning
+# leaving the compat layer as-is, something may in fact depend on that
 use warnings FATAL => 'all';
 
+use base 'DBIx::Class';
 
 sub retrieve {
   my $self = shift;
@@ -67,14 +72,14 @@ sub retrieve_from_sql {
       $attrs{group_by} = $1;
   }
 
-  return $class->search_literal($cond, ( %attrs || () ) );
+  return $class->search_literal($cond, @rest, ( %attrs ? \%attrs : () ) );
 }
 
 sub construct {
     my $class = shift;
     my $obj = $class->resultset_instance->new_result(@_);
     $obj->in_storage(1);
-    
+
     return $obj;
 }