Branch Coverage

blib/lib/MySQL/GrantParser.pm
Criterion Covered Total %
branch 33 46 71.7


line true false branch
19 1 0 if (exists $args{'dbh'}) { }
22 0 0 unless ($args{'hostname'} or $args{'socket'})
34 0 0 if ($args{$arg_key})
43 0 0 unless $self->{'dbh'} = "DBI"->connect($dsn, $args{'user'} || '', $args{'password'} || '', {"AutoCommit", 0})
50 0 1 exists $self->{'dbh'}{'mysql_serverversion'} ? :
70 0 0 if ($self->{'server_version'} >= 50706)
102 20 7 if ($stmt =~ s/\AGRANT (.+?) ON (.+?) TO $q($Q+?)$q\@$q($Q+?)$q\s*//)
108 7 20 if ($stmt =~ s/\ACREATE USER $q($Q+?)$q\@$q($Q+?)$q\s*//)
113 3 24 if ($stmt =~ s/\AIDENTIFIED BY PASSWORD $q($Q+?)$q\s*//)
116 4 23 if ($stmt =~ s/\AIDENTIFIED WITH $q($Q+?)$q AS $q($Q+?)$q\s*//)
120 3 24 if ($stmt =~ s/\AIDENTIFIED WITH $q($Q+?)$q\s*//)
126 9 18 if ($stmt =~ s/\AREQUIRE //)
127 5 4 if ($stmt =~ s/\ANONE\s*//) { }
2 2 elsif ($stmt =~ s/\A(SSL|X509)\s*//) { }
140 9 18 if ($stmt =~ s/\AWITH //)
142 7 2 if ($stmt =~ s/\AGRANT OPTION\s*//)
148 2 7 unless @{$parsed->{'privs'};}
171 12 15 unless (exists $packed->{$user_host})
182 22 5 if $object
183 4 23 if $required
185 7 20 if ($identified)
216 0 1 if ($self->{'need_disconnect'})
217 0 0 if $self->{'dbh'}