| 1 | package URI::oracle; | ||||||||||||
| 2 | 2 | ▶ | use base 'URI::_db'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 2 | our $VERSION = '0.23'; | |||||||||||
| 4 | |||||||||||||
| 5 | 18 | ▶ | sub default_port { 1521 } | ||||||||||
|
Subroutine
default_port: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 6 | 6 | ▶ | sub dbi_driver { 'Oracle' } | ||||||||||
|
Subroutine
dbi_driver: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 7 | |||||||||||||
| 8 | sub _dsn_params { | ||||||||||||
| 9 | 6 | ▶ | my $self = shift; | ||||||||||
|
Subroutine
_dsn_params: called CC=6 SCAR=17.9
| |||||||||||||
| 10 | 6 | ▶ | my $name = $self->dbname || ''; | ||||||||||
|
Condition50%1/2
$self->dbname || ''
MC/DC0%0/1
$self->dbname || ''
$self->dbname
Truth table50%1/2
A
A= $self->dbname
| |||||||||||||
| 11 | 6 | my $dsn = $self->host; | |||||||||||
| 12 | |||||||||||||
| 13 | 6 | ▶ | if (my $p = $self->_port) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 14 | 3 | $dsn .= ":$p"; | |||||||||||
| 15 | } | ||||||||||||
| 16 | |||||||||||||
| 17 | 6 | ▶ | return $name unless $dsn; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 18 | 4 | $dsn .= "/$name"; | |||||||||||
| 19 | |||||||||||||
| 20 | |||||||||||||
| 21 | 4 | ▶ | if (my @p = $self->query_params) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 22 | 1 | my @kvpairs; | |||||||||||
| 23 | 1 | ▶ | while (@p) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 24 | 2 | push @kvpairs => join '=', shift @p, shift @p; | |||||||||||
| 25 | } | ||||||||||||
| 26 | 1 | $dsn .= '?' . join '&' => @kvpairs; | |||||||||||
| 27 | } | ||||||||||||
| 28 | |||||||||||||
| 29 | 4 | return "//$dsn"; | |||||||||||
| 30 | } | ||||||||||||
| 31 | |||||||||||||
| 32 | 2 | 1; | |||||||||||