fix and regression test for RT #62642
[dbsrgits/DBIx-Class.git] / t / storage / dbh_do.t
index a5a58d6..82e33d8 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
@@ -33,4 +31,10 @@ is_deeply (
   [ $storage, $storage->dbh, "baz", "buz" ],
 );
 
+# test aliasing
+my $res = 'original';
+$storage->dbh_do (sub { $_[2] = 'changed' }, $res);
+
+is ($res, 'changed', "Arguments properly aliased for dbh_do");
+
 done_testing;