Branch Coverage

blib/lib/Mojo/mysql.pm
Criterion Covered Total %
branch 24 48 50.0


line true false branch
60 0 0 unless ($self->{'pid'} //= $$) eq $$
70 2 8 unless $str
71 1 7 builtin::blessed($str) ? :
73 0 8 $url->can('engine') ? :
74 1 7 unless $protocol =~ /^(mariadb|mysql)$/u
75 0 7 $protocol eq 'mariadb' ? :
78 0 7 $url->can('dbname') ? :
79 6 1 if length $dbname
82 1 1 file_name_is_absolute($host) ? :
2 5 if (my $host = $url->host)
83 1 6 if (my $port = $url->port)
89 5 2 if ($url->userinfo)
92 3 2 if defined $info[1]
96 0 7 $url->can('query_form_hash') ? :
103 2 10 @_ > 2 || ref $_[-1] eq 'HASH' ? :
107 0 0 ref $_[0] ? :
108 0 0 @_ ? :
0 0 $_[0] ? :
109 0 0 if $ENV{'DBI_TRACE'}
119 0 0 if index($dsn, "dbi:MariaDB") == 0
121 0 0 if $c->[0]->ping
133 0 0 if $self->{'strict_mode'}
134 0 0 if $self->auto_migrate and not $self->{'migrated'}++
141 0 0 if $dbh->{'Active'}