use strict; use warnings; use Test::More tests => 2; use DBI; use Data::Dumper; my $dbh = DBI->connect ('dbi:SQLite:dbname=:memory:', '', ''); my $sth = $dbh->prepare ('SELECT 1 = 1;'); $sth->execute; $sth->finish; ok ! $sth->{Active}, 'Handle is inactive'; my $res = $sth->fetchall_arrayref (); is $res, undef, 'Result is undef' or diag Dumper ($res); diag "DBI $DBI::VERSION"; #### $ perl inactive.t 1..2 ok 1 - Handle is inactive not ok 2 - Result is undef # Failed test 'Result is undef' # at /tmp/inactive2.t line 16. # got: 'ARRAY(0x2c41050)' # expected: undef # $VAR1 = []; # DBI 1.643 # Looks like you failed 1 test of 2.