| lib/URI/Shortener.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 7 | 40 | 17.5 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 200 | 5 | 0 | 0 | $dbname ne ":memory:" and not -f $dbname |
| line | l | !l | condition |
|---|---|---|---|
| 92 | 0 | 8 | $options{'dbtype'} //= "sqlite" |
| 135 | 20144 | 0 | $rows //= [] |
| 171 | 6 | 0 | $rows //= [] |
| 222 | 0 | 0 | ($self->{'dbhost'} // $ENV{'PGHOST'}) || 'localhost' |
| 223 | 0 | 0 | ($self->{'dbport'} // $ENV{'PGPORT'}) || 5432 |
| 243 | 0 | 0 | ($self->{'dbhost'} // $ENV{'MYSQL_HOST'}) || 'localhost' |
| 244 | 0 | 0 | ($self->{'dbport'} // $ENV{'MYSQL_TCP_PORT'}) || 3306 |
| 250 | 0 | 0 | $self->{'mysql_read_default_group'} // "client" |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 94 | 3 | 5 | 0 | $options{'domain'} ||= join("", (('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'), ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'))) |
| 99 | 0 | 0 | 5 | not $options{'length'} or $options{'length'} < 0 |
| 224 | 0 | 0 | 0 | $self->{'dbuser'} // $ENV{'PGUSER'} |
| 225 | 0 | 0 | 0 | $self->{'dbpass'} // $ENV{'PGPASSWORD'} |
| 245 | 0 | 0 | 0 | $self->{'dbuser'} // $ENV{'DBI_USER'} |
| 246 | 0 | 0 | 0 | $self->{'dbpass'} // $ENV{'MYSQL_PWD'} |
| 249 | 0 | 0 | 0 | $self->{'mysql_read_default_file'} // "$ENV{'HOME'}/.my.cnf" |