| 1 | package DBIx::DBO::Table; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 14 | ▶ | use 5.014; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 14 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 14 | ▶ | use DBIx::DBO; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 14 | ▶ | use Carp 'croak'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 14 | ▶ | use overload '**' => \&column, fallback => 1; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 14 | *_isa = \&DBIx::DBO::DBD::_isa; | |||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | =head1 NAME | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | DBIx::DBO::Table - An OO interface to SQL queries and results. Encapsulates a table in an object. | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | =head1 SYNOPSIS | ||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | # Create a Table object | ||||||||||||||||||||
| 20 | my $table = $dbo->table('my_table'); | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | # Get a column reference | ||||||||||||||||||||
| 23 | my $column = $table ** 'employee_id'; | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | # Insert a new row into the table | ||||||||||||||||||||
| 26 | $table->insert(employee_id => 007, name => 'James Bond'); | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | # Remove rows from the table where the name IS NULL | ||||||||||||||||||||
| 29 | $table->delete(name => undef); | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | =head1 DESCRIPTION | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | C<Table> objects are mostly used for column references in a L<Query|DBIx::DBO::Query>. | ||||||||||||||||||||
| 34 | They can also be used for INSERTs and DELETEs. | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | =head1 METHODS | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | =head3 C<new> | ||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | DBIx::DBO::Table->new($dbo, $table); | ||||||||||||||||||||
| 41 | # or | ||||||||||||||||||||
| 42 | $dbo->table($table); | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | Create and return a new C<Table> object. | ||||||||||||||||||||
| 45 | The C<$table> argument that specifies the table can be a string containing the table name, C<'customers'> or C<'history.log'>, it can be an arrayref of schema and table name C<['history', 'log']> or as another Table object to clone. | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | =cut | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 27 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||
| 50 | 27 | my $proto = shift; | |||||||||||||||||||
| 51 | 27 | ▶ | eval { $_[0]->isa('DBIx::DBO') } or croak 'Invalid DBO Object'; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 52 | 26 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition66%2/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table66%2/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 53 | 26 | $class->_init(@_); | |||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | 26 | ▶ | sub _init { | ||||||||||||||||||
|
Subroutine
_init: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 57 | 26 | my($class, $dbo, $table) = @_; | |||||||||||||||||||
| 58 | 26 | (my $schema, $table, my $info) = $dbo->table_info($table); | |||||||||||||||||||
| 59 | 21 | bless { %$info, Schema => $schema, Name => $table, DBO => $dbo, LastInsertID => undef }, $class; | |||||||||||||||||||
| 60 | } | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | =head3 C<tables> | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | Return a list of C<Table> objects, which will always be this C<Table> object. | ||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | =cut | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | 1 | ▶ | sub tables { | ||||||||||||||||||
|
Subroutine
tables: called CC=2 SCAR=7.6
Pod
documented
| |||||||||||||||||||||
| 69 | 1 | ▶ | wantarray ? $_[0] : 1; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 70 | } | ||||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | 22 | ▶ | sub _table_alias { | ||||||||||||||||||
|
Subroutine
_table_alias: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 73 | 22 | undef; | |||||||||||||||||||
| 74 | } | ||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | =head3 C<name> | ||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | $table_name = $table->name; | ||||||||||||||||||||
| 79 | ($schema_name, $table_name) = $table->name; | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | In scalar context it returns the name of the table in list context the schema and table names are returned. | ||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | =cut | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 0 | ▶ | sub name { | ||||||||||||||||||
|
Subroutine
name: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 86 | 0 | ▶ | wantarray ? @{$_[0]}{qw(Schema Name)} : $_[0]->{Name}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 87 | } | ||||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | 134 | ▶ | sub _as_table { | ||||||||||||||||||
|
Subroutine
_as_table: called CC=2 SCAR=7.1
| |||||||||||||||||||||
| 90 | 134 | my $me = shift; | |||||||||||||||||||
| 91 | 134 | ▶ | $me->{_as_table} //= $me->{DBO}{dbd_class}->_qi($me, @$me{qw(Schema Name)}); | ||||||||||||||||||
|
Condition66%2/3
$me->{"_as_table"} //= $me->{"DBO"}{"dbd_class"}->_qi($me, @$me{"Schema", "Name"})
MC/DC0%0/2
$me->{"_as_table"} //= $me->{"DBO"}{"dbd_class"}->_qi($me, @$me{"Schema", "Name"})
$me->{"_as_table"}
$me->{"DBO"}{"dbd_class"}->_qi($me, @$me{"Schema", "Name"})
Truth table66%2/3
A //= B
A= $me->{"_as_table"}B= $me->{"DBO"}{"dbd_class"}->_qi($me, @$me{"Schema", "Name"})
| |||||||||||||||||||||
| 92 | } | ||||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | =head3 C<columns> | ||||||||||||||||||||
| 95 | |||||||||||||||||||||
| 96 | Return a list of column names. | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | =cut | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 9 | ▶ | sub columns { | ||||||||||||||||||
|
Subroutine
columns: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 101 | 9 | @{$_[0]->{Columns}}; | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | =head3 C<column> | ||||||||||||||||||||
| 105 | |||||||||||||||||||||
| 106 | $table->column($column_name); | ||||||||||||||||||||
| 107 | $table ** $column_name; | ||||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | Returns a reference to a column for use with other methods. | ||||||||||||||||||||
| 110 | The C<**> method is a shortcut for the C<column> method. | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | =cut | ||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 73 | ▶ | sub column { | ||||||||||||||||||
|
Subroutine
column: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||
| 115 | 73 | my($me, $col) = @_; | |||||||||||||||||||
| 116 | 73 | ▶ | croak 'Missing argument for column' unless defined $col; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 117 | croak 'Invalid column '.$me->{DBO}{dbd_class}->_qi($me, $col).' in table '.$me->_as_table | ||||||||||||||||||||
| 118 | 73 | ▶ | unless exists $me->{Column_Idx}{$col}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 119 | 72 | ▶ | $me->{Column}{$col} //= bless [$me, $col], 'DBIx::DBO::Column'; | ||||||||||||||||||
|
Condition100%2/2
$me->{"Column"}{$col} //= bless([$me, $col], "DBIx::DBO::Column")
MC/DC100%1/1
$me->{"Column"}{$col} //= bless([$me, $col], "DBIx::DBO::Column")
$me->{"Column"}{$col}
Truth table100%2/2
A
A= $me->{"Column"}{$col}
| |||||||||||||||||||||
| 120 | } | ||||||||||||||||||||
| 121 | 14 | *_inner_col = \&column; | |||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | =head3 C<insert> | ||||||||||||||||||||
| 124 | |||||||||||||||||||||
| 125 | $table->insert(name => 'Richard', age => 103); | ||||||||||||||||||||
| 126 | |||||||||||||||||||||
| 127 | Insert a row into the table. Returns true on success or C<undef> on failure. | ||||||||||||||||||||
| 128 | |||||||||||||||||||||
| 129 | On supporting databases you may also use C<$table-E<gt>last_insert_id> to retreive | ||||||||||||||||||||
| 130 | the autogenerated ID (if there was one) from the last inserted row. | ||||||||||||||||||||
| 131 | |||||||||||||||||||||
| 132 | =cut | ||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | 7 | ▶ | sub insert { | ||||||||||||||||||
|
Subroutine
insert: called CC=7 SCAR=19.6
Pod
documented
| |||||||||||||||||||||
| 135 | 7 | my $me = shift; | |||||||||||||||||||
| 136 | 7 | ▶ | croak 'Called insert() without args on table '.$me->_as_table unless @_; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 137 | 7 | ▶ | croak 'Wrong number of arguments' if @_ & 1; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 138 | 7 | my @cols; | |||||||||||||||||||
| 139 | my @vals; | ||||||||||||||||||||
| 140 | 7 | my @bind; | |||||||||||||||||||
| 141 | 7 | my %remove_duplicates; | |||||||||||||||||||
| 142 | 7 | ▶ | while (@_) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 143 | 14 | my @val = $me->{DBO}{dbd_class}->_parse_val($me, pop); | |||||||||||||||||||
| 144 | 14 | my $col = $me->{DBO}{dbd_class}->_build_col($me, $me->{DBO}{dbd_class}->_parse_col($me, pop)); | |||||||||||||||||||
| 145 | 14 | ▶ | next if $remove_duplicates{$col}++; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 146 | 13 | push @cols, $col; | |||||||||||||||||||
| 147 | 13 | push @vals, $me->{DBO}{dbd_class}->_build_val($me, \@bind, @val); | |||||||||||||||||||
| 148 | } | ||||||||||||||||||||
| 149 | 7 | my $sql = 'INSERT INTO '.$me->_as_table.' ('.join(', ', @cols).') VALUES ('.join(', ', @vals).')'; | |||||||||||||||||||
| 150 | 7 | $me->{DBO}{dbd_class}->_sql($me, $sql, @bind); | |||||||||||||||||||
| 151 | 7 | ▶ | my $sth = $me->dbh->prepare($sql) or return undef; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 152 | 7 | ▶ | my $rv = $sth->execute(@bind) or return undef; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 153 | 7 | $me->{LastInsertID} = $me->{DBO}{dbd_class}->_save_last_insert_id($me, $sth); | |||||||||||||||||||
| 154 | 7 | return $rv; | |||||||||||||||||||
| 155 | } | ||||||||||||||||||||
| 156 | |||||||||||||||||||||
| 157 | =head3 C<last_insert_id> | ||||||||||||||||||||
| 158 | |||||||||||||||||||||
| 159 | $table->insert(name => 'Quentin'); | ||||||||||||||||||||
| 160 | my $row_id = $table->last_insert_id; | ||||||||||||||||||||
| 161 | |||||||||||||||||||||
| 162 | Retreive the autogenerated ID (if there was one) from the last inserted row. | ||||||||||||||||||||
| 163 | |||||||||||||||||||||
| 164 | Returns the ID or undef if it's unavailable. | ||||||||||||||||||||
| 165 | |||||||||||||||||||||
| 166 | =cut | ||||||||||||||||||||
| 167 | |||||||||||||||||||||
| 168 | 1 | ▶ | sub last_insert_id { | ||||||||||||||||||
|
Subroutine
last_insert_id: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 169 | 1 | my $me = shift; | |||||||||||||||||||
| 170 | 1 | $me->{LastInsertID}; | |||||||||||||||||||
| 171 | } | ||||||||||||||||||||
| 172 | |||||||||||||||||||||
| 173 | =head3 C<bulk_insert> | ||||||||||||||||||||
| 174 | |||||||||||||||||||||
| 175 | $table->bulk_insert( | ||||||||||||||||||||
| 176 | columns => [qw(id name age)], # Optional | ||||||||||||||||||||
| 177 | rows => [{name => 'Richard', age => 103}, ...] | ||||||||||||||||||||
| 178 | ); | ||||||||||||||||||||
| 179 | $table->bulk_insert( | ||||||||||||||||||||
| 180 | columns => [qw(id name age)], # Optional | ||||||||||||||||||||
| 181 | rows => [[ undef, 'Richard', 103 ], ...] | ||||||||||||||||||||
| 182 | ); | ||||||||||||||||||||
| 183 | |||||||||||||||||||||
| 184 | Insert multiple rows into the table. | ||||||||||||||||||||
| 185 | Returns the number of rows inserted or C<undef> on failure. | ||||||||||||||||||||
| 186 | |||||||||||||||||||||
| 187 | The C<columns> need not be passed in, and will default to all the columns in the table. | ||||||||||||||||||||
| 188 | |||||||||||||||||||||
| 189 | On supporting databases you may also use C<$table-E<gt>last_insert_id> to retreive | ||||||||||||||||||||
| 190 | the autogenerated ID (if there was one) from the last inserted row. | ||||||||||||||||||||
| 191 | |||||||||||||||||||||
| 192 | =cut | ||||||||||||||||||||
| 193 | |||||||||||||||||||||
| 194 | 4 | ▶ | sub bulk_insert { | ||||||||||||||||||
|
Subroutine
bulk_insert: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||
| 195 | 4 | my($me, %opt) = @_; | |||||||||||||||||||
| 196 | 4 | ▶ | croak 'The "rows" argument must be an arrayref' if ref $opt{rows} ne 'ARRAY'; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 197 | 4 | my $sql = 'INSERT INTO '.$me->_as_table; | |||||||||||||||||||
| 198 | |||||||||||||||||||||
| 199 | 4 | my @cols; | |||||||||||||||||||
| 200 | 4 | ▶ | if (defined $opt{columns}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 201 | 2 | @cols = map $me->column($_), @{$opt{columns}}; | |||||||||||||||||||
| 202 | 2 | $sql .= ' ('.join(', ', map $me->{DBO}{dbd_class}->_build_col($me, $_), @cols).')'; | |||||||||||||||||||
| 203 | 2 | @cols = map $_->[1], @cols; | |||||||||||||||||||
| 204 | } else { | ||||||||||||||||||||
| 205 | 2 | @cols = @{$me->{Columns}}; | |||||||||||||||||||
| 206 | } | ||||||||||||||||||||
| 207 | 4 | $sql .= ' VALUES '; | |||||||||||||||||||
| 208 | |||||||||||||||||||||
| 209 | 4 | $me->{DBO}{dbd_class}->_bulk_insert($me, $sql, \@cols, %opt); | |||||||||||||||||||
| 210 | } | ||||||||||||||||||||
| 211 | |||||||||||||||||||||
| 212 | =head3 C<delete> | ||||||||||||||||||||
| 213 | |||||||||||||||||||||
| 214 | $table->delete(name => 'Richard', age => 103); | ||||||||||||||||||||
| 215 | |||||||||||||||||||||
| 216 | Delete all rows from the table matching the criteria. Returns the number of rows deleted or C<undef> on failure. | ||||||||||||||||||||
| 217 | |||||||||||||||||||||
| 218 | =cut | ||||||||||||||||||||
| 219 | |||||||||||||||||||||
| 220 | 8 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 221 | 8 | my $me = shift; | |||||||||||||||||||
| 222 | 8 | my $sql = 'DELETE FROM '.$me->_as_table; | |||||||||||||||||||
| 223 | 8 | my @bind; | |||||||||||||||||||
| 224 | my $clause; | ||||||||||||||||||||
| 225 | 8 | ▶ | $sql .= ' WHERE '.$clause if $clause = $me->{DBO}{dbd_class}->_build_quick_where($me, \@bind, @_); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 226 | 7 | $me->{DBO}{dbd_class}->_do($me, $sql, undef, @bind); | |||||||||||||||||||
| 227 | } | ||||||||||||||||||||
| 228 | |||||||||||||||||||||
| 229 | =head3 C<truncate> | ||||||||||||||||||||
| 230 | |||||||||||||||||||||
| 231 | $table->truncate; | ||||||||||||||||||||
| 232 | |||||||||||||||||||||
| 233 | Truncate the table. Returns true on success or C<undef> on failure. | ||||||||||||||||||||
| 234 | |||||||||||||||||||||
| 235 | =cut | ||||||||||||||||||||
| 236 | |||||||||||||||||||||
| 237 | 0 | ▶ | sub truncate { | ||||||||||||||||||
|
Subroutine
truncate: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 238 | 0 | my $me = shift; | |||||||||||||||||||
| 239 | 0 | $me->{DBO}{dbd_class}->_do($me, 'TRUNCATE TABLE '.$me->_as_table); | |||||||||||||||||||
| 240 | } | ||||||||||||||||||||
| 241 | |||||||||||||||||||||
| 242 | =head2 Common Methods | ||||||||||||||||||||
| 243 | |||||||||||||||||||||
| 244 | These methods are accessible from all DBIx::DBO* objects. | ||||||||||||||||||||
| 245 | |||||||||||||||||||||
| 246 | =head3 C<dbo> | ||||||||||||||||||||
| 247 | |||||||||||||||||||||
| 248 | The C<DBO> object. | ||||||||||||||||||||
| 249 | |||||||||||||||||||||
| 250 | =head3 C<dbh> | ||||||||||||||||||||
| 251 | |||||||||||||||||||||
| 252 | The I<read-write> C<DBI> handle. | ||||||||||||||||||||
| 253 | |||||||||||||||||||||
| 254 | =head3 C<rdbh> | ||||||||||||||||||||
| 255 | |||||||||||||||||||||
| 256 | The I<read-only> C<DBI> handle, or if there is no I<read-only> connection, the I<read-write> C<DBI> handle. | ||||||||||||||||||||
| 257 | |||||||||||||||||||||
| 258 | =cut | ||||||||||||||||||||
| 259 | |||||||||||||||||||||
| 260 | 3 | ▶ | sub dbo { $_[0]{DBO} } | ||||||||||||||||||
|
Subroutine
dbo: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 261 | 18 | ▶ | sub dbh { $_[0]{DBO}->dbh } | ||||||||||||||||||
|
Subroutine
dbh: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 262 | 36 | ▶ | sub rdbh { $_[0]{DBO}->rdbh } | ||||||||||||||||||
|
Subroutine
rdbh: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 263 | |||||||||||||||||||||
| 264 | =head3 C<config> | ||||||||||||||||||||
| 265 | |||||||||||||||||||||
| 266 | $table_setting = $table->config($option); | ||||||||||||||||||||
| 267 | $table->config($option => $table_setting); | ||||||||||||||||||||
| 268 | |||||||||||||||||||||
| 269 | Get or set the C<Table> config settings. When setting an option, the previous value is returned. When getting an option's value, if the value is undefined, the L<DBIx::DBO|DBIx::DBO>'s value is returned. | ||||||||||||||||||||
| 270 | |||||||||||||||||||||
| 271 | See L<DBIx::DBO/"Available config options">. | ||||||||||||||||||||
| 272 | |||||||||||||||||||||
| 273 | =cut | ||||||||||||||||||||
| 274 | |||||||||||||||||||||
| 275 | 132 | ▶ | sub config { | ||||||||||||||||||
|
Subroutine
config: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||
| 276 | 132 | my $me = shift; | |||||||||||||||||||
| 277 | 132 | my $opt = shift; | |||||||||||||||||||
| 278 | 132 | ▶ | return $me->{DBO}{dbd_class}->_set_config($me->{Config} //= {}, $opt, shift) if @_; | ||||||||||||||||||
|
Branch: 1 branch
Condition50%1/2
$me->{"Config"} //= {}
MC/DC0%0/1
$me->{"Config"} //= {}
$me->{"Config"}
Truth table50%1/2
A
A= $me->{"Config"}
| |||||||||||||||||||||
| 279 | 102 | ▶ | $me->{DBO}{dbd_class}->_get_config($opt, $me->{Config} //= {}, $me->{DBO}{Config}, \%DBIx::DBO::Config); | ||||||||||||||||||
|
Condition100%2/2
$me->{"Config"} //= {}
MC/DC100%1/1
$me->{"Config"} //= {}
$me->{"Config"}
Truth table100%2/2
A
A= $me->{"Config"}
| |||||||||||||||||||||
| 280 | } | ||||||||||||||||||||
| 281 | |||||||||||||||||||||
| 282 | 7 | ▶ | sub DESTROY { | ||||||||||||||||||
|
Subroutine
DESTROY: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 283 | 7 | undef %{$_[0]}; | |||||||||||||||||||
| 284 | } | ||||||||||||||||||||
| 285 | |||||||||||||||||||||
| 286 | 14 | 1; | |||||||||||||||||||
| 287 | |||||||||||||||||||||
| 288 | __END__ | ||||||||||||||||||||