Showing 1 changed files with 3 additions and 5 deletions
+3 -5
lib/DBIx/Custom.pm
... ...
@@ -447,11 +447,9 @@ sub execute {
447 447
     my $sth = $query->sth;
448 448
     my $affected;
449 449
     eval {
450
-        for (my $i = 0; $i < @$bind; $i++) {
451
-            my $bind_type = $bind->[$i]->{bind_type};
452
-            $sth->bind_param($i + 1, $bind->[$i]->{value},
453
-              $bind_type ? $bind_type : ());
454
-        }
450
+        $sth->bind_param($_ + 1, $bind->[$_]->{value},
451
+            $bind->[$_]->{bind_type} ? $bind->[$_]->{bind_type} : ())
452
+          for (0 .. @$bind - 1);
455 453
         $affected = $sth->execute;
456 454
     };
457 455