Showing 1 changed files with 3 additions and 8 deletions
+3 -8
lib/DBIx/Custom.pm
... ...
@@ -552,7 +552,7 @@ sub execute {
552 552
     }
553 553
     
554 554
     # Result
555
-    my $result = $self->result_class->new(
555
+    $self->result_class->new(
556 556
         sth => $sth,
557 557
         dbi => $self,
558 558
         default_filter => $self->{default_in_filter},
... ...
@@ -563,7 +563,6 @@ sub execute {
563 563
             from2 => $self->type_rule->{from2}
564 564
         },
565 565
     );
566
-    $result;
567 566
 }
568 567
 
569 568
 sub get_table_info {
... ...
@@ -1257,12 +1256,8 @@ sub _create_query {
1257 1256
     }
1258 1257
 
1259 1258
     # Filter SQL
1260
-    if ($after_build_sql) {
1261
-        my $sql = $query->{sql};
1262
-        $sql = $after_build_sql->($sql);
1263
-        $query->{sql} = $sql;
1264
-    }
1265
-        
1259
+    $query->{sql} = $after_build_sql->($query->{sql}) if $after_build_sql;
1260
+    
1266 1261
     # Save sql
1267 1262
     $self->{last_sql} = $query->{sql};
1268 1263