Branch Coverage

blib/lib/Mojo/mysql.pm
Criterion Covered Total %
branch 22 42 52.3


line true false branch
57 0 0 unless ($self->{'pid'} //= $$) eq $$
67 2 8 unless $str
68 1 7 UNIVERSAL::isa($str, 'Mojo::URL') ? :
69 1 7 unless $url->protocol =~ /^(mariadb|mysql)$/u
70 0 7 $url->protocol eq 'mariadb' ? :
73 0 7 if $dsn eq "dbi:MariaDB" and not eval "use DBD::MariaDB 1.21;1"
77 6 1 if defined $url->path->parts->[0]
80 1 1 file_name_is_absolute($host) ? :
2 5 if (my $host = $url->host)
81 1 6 if (my $port = $url->port)
87 5 2 if (($url->userinfo // "") =~ /^([^:]+)(?::([^:]+))?$/u)
89 3 2 if defined $2
100 2 10 @_ > 2 || ref $_[-1] eq 'HASH' ? :
104 0 0 ref $_[0] ? :
105 0 0 @_ ? :
0 0 $_[0] ? :
106 0 0 if $ENV{'DBI_TRACE'}
115 0 0 if $c->[0]->ping
127 0 0 if $self->{'strict_mode'}
128 0 0 if $self->auto_migrate and not $self->{'migrated'}++
135 0 0 if $dbh->{'Active'}