Condition Coverage

blib/lib/DBR/Config/Instance.pm
Criterion Covered Total %
condition 32 59 54.2


and 3 conditions

line !l l&&!r l&&r condition
212 51 0 2964 $conn and $conn->ping

or 2 conditions

line l !l condition
57 50 0 $params{'handle'} || (return $self->_error('handle is required'))
58 0 50 $params{'class'} || 'master'
81 17 0 $params{'parent_inst'} || (return $self->_error('parent_inst is required'))
82 17 0 $parent->connect || (return $self->_error("Failed to connect to (@{[$parent->handle];} @{[$parent->class];})"))
119 34 0 $$spec{'class'} || 'master'
17 17 $$spec{'instance_id'} || ''
17 17 $$spec{'schema_id'} || ''
0 34 $$spec{'allowquery'} || 0
0 34 $$spec{'readonly'} || 0
137 34 0 $connectstrings{$$config{'module'}} || (return $self->_error("module '$$config{'module'}' is not a supported database type"))
191 1792 636 shift() || ''
264 82 555 $self->schema_id || (return '')
266 82 0 'DBR::Config::Schema'->new('session', $$self{'session'}, 'schema_id', $schema_id) || (return $self->_error("failed to fetch schema object for schema_id $schema_id"))

or 3 conditions

line l !l&&r !l&&!r condition
60 50 0 0 $INSTANCE_MAP{$handle}{$class} || $INSTANCE_MAP{$handle}{'*'}
93 17 0 0 $self->register('session', $$self{'session'}, 'spec', $instrow) || $self->_error("failed to load instance from database (@{[$parent->handle];} @{[$parent->class];})")
105 17 17 0 ref $package || $package
119 17 17 0 $$spec{'handle'} || $$spec{'name'}
17 17 0 $$spec{'module'} || $$spec{'type'}
0 0 34 $$spec{'dbname'} || $$spec{'database'}
0 0 34 $$spec{'hostname'} || $$spec{'host'}
0 0 34 $$spec{'username'} || $$spec{'user'}
157 0 34 0 $INSTANCE_MAP{$$config{'handle'}}{$$config{'class'}} || $GUID++
160 0 34 0 $INSTANCE_MAP{$$config{'handle'}}{$$config{'class'}} ||= $guid