| 1 | ############################################################################# | ||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ## Name: HDB.pm | ||||||||||||||||||||||||||||||||||||||||||||||
| 3 | ## Purpose: HDB - Hybrid database | ||||||||||||||||||||||||||||||||||||||||||||||
| 4 | ## Author: Graciliano M. P. | ||||||||||||||||||||||||||||||||||||||||||||||
| 5 | ## Modified by: | ||||||||||||||||||||||||||||||||||||||||||||||
| 6 | ## Created: 06/01/2003 | ||||||||||||||||||||||||||||||||||||||||||||||
| 7 | ## RCS-ID: | ||||||||||||||||||||||||||||||||||||||||||||||
| 8 | ## Copyright: (c) 2003 Graciliano M. P. | ||||||||||||||||||||||||||||||||||||||||||||||
| 9 | ## Licence: This program is free software; you can redistribute it and/or | ||||||||||||||||||||||||||||||||||||||||||||||
| 10 | ## modify it under the same terms as Perl itself | ||||||||||||||||||||||||||||||||||||||||||||||
| 11 | ############################################################################# | ||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||
| 13 | package HDB ; | ||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use 5.006 ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 1 | ▶ | use strict qw(vars) ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 1 | ▶ | use vars qw(@ISA $AUTOLOAD) ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | ▶ | no warnings ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | our ($VERSION) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 22 | 1 | $VERSION = '1.05' ; | |||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | my $REQUIRED ; | |||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||
| 26 | ########### | ||||||||||||||||||||||||||||||||||||||||||||||
| 27 | # REQUIRE # | ||||||||||||||||||||||||||||||||||||||||||||||
| 28 | ########### | ||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 1 | ▶ | sub REQUIRE { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
REQUIRE: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 1 | ▶ | return if $REQUIRED ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 1 | require HDB::CORE ; | |||||||||||||||||||||||||||||||||||||||||||||
| 33 | 1 | require HDB::CMDS ; | |||||||||||||||||||||||||||||||||||||||||||||
| 34 | 1 | require HDB::Encode ; | |||||||||||||||||||||||||||||||||||||||||||||
| 35 | 1 | require HDB::MOD ; | |||||||||||||||||||||||||||||||||||||||||||||
| 36 | 1 | require HDB::Object ; | |||||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | $REQUIRED = 1 ; | |||||||||||||||||||||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||||||
| 40 | ########## | ||||||||||||||||||||||||||||||||||||||||||||||
| 41 | # SCOPES # | ||||||||||||||||||||||||||||||||||||||||||||||
| 42 | ########## | ||||||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||||||
| 44 | 1 | ▶ | use vars qw($HPL_Run_MAIN $HPL_Run_NOW) ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 1 | *HPL_Run_MAIN = \$HPL::Run::MAIN ; | |||||||||||||||||||||||||||||||||||||||||||||
| 47 | 1 | *HPL_Run_NOW = \$HPL::Run::NOW ; | |||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||
| 49 | ############ | ||||||||||||||||||||||||||||||||||||||||||||||
| 50 | # HPL_MAIN # | ||||||||||||||||||||||||||||||||||||||||||||||
| 51 | ############ | ||||||||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | ▶ | sub HPL_MAIN { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
HPL_MAIN: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | return $HPL_Run_MAIN if UNIVERSAL::isa($HPL_Run_MAIN,'UNIVERSAL') ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 0 | ▶ | return $main::HPL if UNIVERSAL::isa($main::HPL,'UNIVERSAL') ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | return ${"main::HPL"} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||||||
| 59 | ######## | ||||||||||||||||||||||||||||||||||||||||||||||
| 60 | # VARS # | ||||||||||||||||||||||||||||||||||||||||||||||
| 61 | ######## | ||||||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 1 | my %args_types = ( | |||||||||||||||||||||||||||||||||||||||||||||
| 64 | file => [qw(file dbfile databasefile db database)] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 65 | db => [qw(db database)] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 66 | host => [[qw(host hostname)],localhost] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 67 | user => [qw(user username)] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 68 | pass => [qw(pass password)] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 69 | type => [[qw(type dbtype databasetype dbd)],auto] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 70 | cache => [[qw(cache)],1] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 71 | id => [qw(id ident)] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 72 | warning => [[qw(warning warnings error errors alert alerts carp)],1] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 73 | dynamic => [[qw(dynamic dyn)],1] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 74 | conf_hpl => [qw(confhpl hplconf)] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 75 | ); | ||||||||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 1 | my (%PASS , %DB , $WITH_HPL , %MOD_LOADED , $RESET_X) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||||||
| 79 | ########## | ||||||||||||||||||||||||||||||||||||||||||||||
| 80 | # IMPORT # | ||||||||||||||||||||||||||||||||||||||||||||||
| 81 | ########## | ||||||||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 1 | ▶ | sub import { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
import: called CC=2 SCAR=9.2
| |||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 1 | my $class = shift ; | |||||||||||||||||||||||||||||||||||||||||||||
| 85 | 1 | ▶ | if ($_[0] =~ /HPL/i) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | $WITH_HPL = 1 ; | |||||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | &REQUIRE() ; | |||||||||||||||||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||||||
| 91 | ############ | ||||||||||||||||||||||||||||||||||||||||||||||
| 92 | # AUTOLOAD # | ||||||||||||||||||||||||||||||||||||||||||||||
| 93 | ############ | ||||||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | ▶ | sub AUTOLOAD { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
AUTOLOAD: not called CC=14 SCAR=53.5
| |||||||||||||||||||||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | ▶ | if ( $#_ == 0 && ref($_[0]) && UNIVERSAL::isa($_[0],'HDB') ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$#_ == 0 and ref $_[0] and UNIVERSAL::isa($_[0], "HDB")
$#_ == 0 and ref $_[0]
MC/DC0%0/3
$#_ == 0 and ref $_[0] and UNIVERSAL::isa($_[0], "HDB")
$#_ == 0
ref $_[0]
UNIVERSAL::isa($_[0], "HDB")
Truth table0%0/4
A and B and C
A= $#_ == 0B= ref $_[0]C= UNIVERSAL::isa($_[0], "HDB")
| |||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | ▶ | if ( ref($_[0]) eq 'HDB' ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | my $this = shift ; | |||||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | my $type = $this->{MOD}{type} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | bless($this , "HDB::MOD::$type") ; | |||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | $this->connect ; | |||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | my ($method) = ( $AUTOLOAD =~ /(\w+)$/s ); | |||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | $this->$method(@_) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | my ($table) = ( $AUTOLOAD =~ /(\w+)$/s ) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | my $TABLE_OBJ = HDB::TABLE->new($_[0] , $table) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | return $TABLE_OBJ ; | |||||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | ▶ | if (ref($_[0])) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | my @caller = caller ; | |||||||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | &HDB::Error(undef,qq`Can't find $AUTOLOAD at $caller[1] line $caller[2]!`) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | return undef ; | |||||||||||||||||||||||||||||||||||||||||||||
| 116 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | my ($id0) = ( $AUTOLOAD =~ /(\w+)$/ ) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | my $id = lc($id0) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | ▶ | if ( $WITH_HPL && $id ne '' ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$WITH_HPL and $id ne ""
MC/DC0%0/2
$WITH_HPL and $id ne ""
$WITH_HPL
$id ne ""
Truth table0%0/3
A and B
A= $WITH_HPLB= $id ne ""
| |||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | my $hpl = &HPL_MAIN() ; | |||||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | ▶ | if ( $hpl ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | my $hpl_root = $hpl->pack_root ; | |||||||||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | ▶ | if ( $id eq 'hploo' && !${"$hpl_root\::MYHDB::DB"}{$id} ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$id eq "hploo" and not do {
"${hpl_root}::MYHDB::DB"
}->{$id}
MC/DC0%0/2
$id eq "hploo" and not do {
"${hpl_root}::MYHDB::DB"
}->{$id}
$id eq "hploo"
not do {
"${hpl_root}::MYHDB::DB"
}->{$id}
Truth table0%0/3
A and not(B)
A= $id eq "hploo"B= not do {
"${hpl_root}::MYHDB::DB"
}->{$id}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | $id = (sort keys %{"$hpl_root\::MYHDB::DB"})[0] ; | |||||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | ▶ | if ( $id ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | $hpl->warn(qq`HDB id HPLOO not defined, using 1st defined DB for HDB::Object persistence.` , 1) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ${"$hpl_root\::MYHDB::DB"}{hploo} = ${"$hpl_root\::MYHDB::DB"}{$id} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 132 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 133 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | my $obj = ${"$hpl_root\::MYHDB::DB"}{$id} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | ▶ | if (!$obj) { $hpl->warn(qq`Can't find HDB id "$id" for dynamic access $_[0]\->$id0 !`) ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | return $obj ; | |||||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 140 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 0 | ▶ | if (! $DB{$id}) { &HDB::Error(undef,qq`Can't find HDB id "$id" for dynamic access $_[0]\->$id0 !`) ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | return $DB{$id} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | return undef ; | |||||||||||||||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||||||
| 148 | ########### | ||||||||||||||||||||||||||||||||||||||||||||||
| 149 | # ALIASES # | ||||||||||||||||||||||||||||||||||||||||||||||
| 150 | ########### | ||||||||||||||||||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | ▶ | sub WITH_HPL { $WITH_HPL ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
WITH_HPL: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | ▶ | sub open { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
open: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | ▶ | if ( ref $_[0] && UNIVERSAL::isa($_[0],'HDB') ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $_[0] and UNIVERSAL::isa($_[0], "HDB")
MC/DC0%0/2
ref $_[0] and UNIVERSAL::isa($_[0], "HDB")
ref $_[0]
UNIVERSAL::isa($_[0], "HDB")
Truth table0%0/3
A and B
A= ref $_[0]B= UNIVERSAL::isa($_[0], "HDB")
| |||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | $_[0]->connect ; | |||||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | return $_[0] ; | |||||||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | else { return &new(@_) ;} | |||||||||||||||||||||||||||||||||||||||||||||
| 160 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | ▶ | sub close { $_[0]->disconnect ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
close: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||||||||||||||
| 164 | ####### | ||||||||||||||||||||||||||||||||||||||||||||||
| 165 | # NEW # | ||||||||||||||||||||||||||||||||||||||||||||||
| 166 | ####### | ||||||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=19 SCAR=59.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | &REQUIRE() ; | |||||||||||||||||||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | my $class = shift ; | |||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | my $this = {} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | &HDB::CORE::parse_args($this , \%args_types , @_) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | ▶ | $this->{file} = &HDB::CORE::path($this->{file}) if defined $this->{file} ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | $this->{id} =~ s/\W//s ; | |||||||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | $this->{id} = lc( $this->{id} ) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | ▶ | if ( $this->{type} eq 'auto' ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 0 | ▶ | if ( defined $this->{file} ) { $this->{type} = 'sqlite' ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | else { $this->{type} = 'mysql' ;} | |||||||||||||||||||||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 184 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 0 | my $type = $this->{type} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | $this->{type} =~ s/\W//gs ; | |||||||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | $this->{type} = lc( $this->{type} ) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | ▶ | return Error($this,"Invalid type!") if $this->{type} eq '' ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 0 | my $type = $this->{type} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | ▶ | if ( !&_require_module($type) ) { return Error($this,"Can't find HDB module for $type (HDB::MOD::$type)!") ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | &{"HDB::MOD::$type\::new"}($this) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | ▶ | return $this->Error("Error on loanding HDB module $type (HDB::MOD::$type)!") if !$this ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 0 | ▶ | if ( ($this->{conf_hpl} || $WITH_HPL ) && $this->{file} ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$this->{"conf_hpl"} || $WITH_HPL and $this->{"file"}
$this->{"conf_hpl"} or $WITH_HPL
MC/DC0%0/3
$this->{"conf_hpl"} || $WITH_HPL and $this->{"file"}
$this->{"conf_hpl"}
$WITH_HPL
$this->{"file"}
Truth table0%0/5
A or B and C
A= $this->{"conf_hpl"}B= $WITH_HPLC= $this->{"file"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | my $hpl = &HPL_MAIN() ; | |||||||||||||||||||||||||||||||||||||||||||||
| 202 | 0 | ▶ | if ( defined $hpl->env->{DOCUMENT_ROOT} ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 0 | $this->{file} =~ s/^[\/\\][\/\\]/$hpl->env->{DOCUMENT_ROOT}/se ; | |||||||||||||||||||||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 205 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||||||||||||||||
| 207 | ## "HIDDE" PASS: | ||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 0 | $PASS{$this} = $this->{pass} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 209 | 0 | delete $this->{pass} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | eval { $this->connect }; | |||||||||||||||||||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 0 | ▶ | if ( !$this || !$this->connected || !$this->dbh ) { $this->Error("Can't connect to DB. Load error!") ; return ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$this and $this->connected and $this->dbh
$this and $this->connected
MC/DC0%0/3
$this and $this->connected and $this->dbh
$this
$this->connected
$this->dbh
Truth table0%0/4
A and B and C
A= $thisB= $this->connectedC= $this->dbh
| |||||||||||||||||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 0 | ▶ | if ($this->{dynamic} && $this->{id} ne '') { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$this->{"dynamic"} and $this->{"id"} ne ""
MC/DC0%0/2
$this->{"dynamic"} and $this->{"id"} ne ""
$this->{"dynamic"}
$this->{"id"} ne ""
Truth table0%0/3
A and B
A= $this->{"dynamic"}B= $this->{"id"} ne ""
| |||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 0 | ▶ | if ( $WITH_HPL ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 217 | 0 | $this->{WITH_HPL} = 1 ; | |||||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | my $hpl = &HPL_MAIN() ; | |||||||||||||||||||||||||||||||||||||||||||||
| 219 | 0 | ▶ | if ( $hpl ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | my $hpl_root = $hpl->pack_root ; | |||||||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | ${"$hpl_root\::MYHDB::DB"}{ $this->{id} } = $this ; | |||||||||||||||||||||||||||||||||||||||||||||
| 222 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 223 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | else { $DB{ $this->{id} } = $this ;} | |||||||||||||||||||||||||||||||||||||||||||||
| 225 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 226 | |||||||||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||||||||
| 228 | 0 | ▶ | if ( $WITH_HPL ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | $this->dbh->{HandleError} = \&HPL_show_error ; | |||||||||||||||||||||||||||||||||||||||||||||
| 230 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||||||||||||||||
| 232 | 0 | return $this ; | |||||||||||||||||||||||||||||||||||||||||||||
| 233 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||||||||||||||||||||
| 235 | ################## | ||||||||||||||||||||||||||||||||||||||||||||||
| 236 | # HPL_SHOW_ERROR # | ||||||||||||||||||||||||||||||||||||||||||||||
| 237 | ################## | ||||||||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||||||
| 239 | 0 | ▶ | sub HPL_show_error { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
HPL_show_error: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | my $hpl = &HPL_MAIN() ; | |||||||||||||||||||||||||||||||||||||||||||||
| 241 | 0 | ▶ | $hpl->warn($_[0]) if $hpl ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 242 | 0 | return $_[2] ; | |||||||||||||||||||||||||||||||||||||||||||||
| 243 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||||||
| 245 | ########### | ||||||||||||||||||||||||||||||||||||||||||||||
| 246 | # CONNECT # | ||||||||||||||||||||||||||||||||||||||||||||||
| 247 | ########### | ||||||||||||||||||||||||||||||||||||||||||||||
| 248 | |||||||||||||||||||||||||||||||||||||||||||||||
| 249 | 0 | ▶ | sub connect { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
connect: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | ▶ | if ( $_[0]->{dbh} ) { return $_[0]->{dbh} ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | $_[0]->MOD_connect( $PASS{$_[0]} ) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | return $_[0]->{dbh} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 253 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||||||
| 255 | ############# | ||||||||||||||||||||||||||||||||||||||||||||||
| 256 | # RECONNECT # | ||||||||||||||||||||||||||||||||||||||||||||||
| 257 | ############# | ||||||||||||||||||||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | ▶ | sub reconnect { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
reconnect: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 0 | $_[0]->disconnect ; | |||||||||||||||||||||||||||||||||||||||||||||
| 261 | 0 | $_[0]->connect ; | |||||||||||||||||||||||||||||||||||||||||||||
| 262 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||||||||||||||||||
| 264 | ######### | ||||||||||||||||||||||||||||||||||||||||||||||
| 265 | # ERROR # | ||||||||||||||||||||||||||||||||||||||||||||||
| 266 | ######### | ||||||||||||||||||||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | ▶ | sub Error { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
Error: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | ▶ | if ( $_[0]->{sth} ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | $_[0]->{sth}->finish ; | |||||||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | $_[0]->{sth} = undef ; | |||||||||||||||||||||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 0 | ▶ | if ($_[0] && !$_[0]->{warning}) { return ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$_[0] and not $_[0]{"warning"}
MC/DC0%0/2
$_[0] and not $_[0]{"warning"}
$_[0]
not $_[0]{"warning"}
Truth table0%0/3
A and not(B)
A= $_[0]B= not $_[0]{"warning"}
| |||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | ▶ | if ($_[0] && ref $_[0]->{warning} eq 'CODE') { &{$_[0]->{warning}}($_[1]) } | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$_[0] and ref $_[0]{"warning"} eq "CODE"
MC/DC0%0/2
$_[0] and ref $_[0]{"warning"} eq "CODE"
$_[0]
ref $_[0]{"warning"} eq "CODE"
Truth table0%0/3
A and B
A= $_[0]B= ref $_[0]{"warning"} eq "CODE"
| |||||||||||||||||||||||||||||||||||||||||||||||
| 277 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | ▶ | if ($WITH_HPL) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 279 | 0 | my $hpl = &HPL_MAIN() ; | |||||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | ▶ | $hpl->warn($_[1] , $_[2]) if $hpl ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 281 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 282 | else { | ||||||||||||||||||||||||||||||||||||||||||||||
| 283 | 0 | eval { | |||||||||||||||||||||||||||||||||||||||||||||
| 284 | 0 | require Carp ; | |||||||||||||||||||||||||||||||||||||||||||||
| 285 | 0 | Carp::carp($_[1]) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 286 | }; | ||||||||||||||||||||||||||||||||||||||||||||||
| 287 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 288 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | return ; | |||||||||||||||||||||||||||||||||||||||||||||
| 291 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||||||||||
| 293 | ################### | ||||||||||||||||||||||||||||||||||||||||||||||
| 294 | # _REQUIRE_MODULE # | ||||||||||||||||||||||||||||||||||||||||||||||
| 295 | ################### | ||||||||||||||||||||||||||||||||||||||||||||||
| 296 | |||||||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | ▶ | sub _require_module { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_require_module: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||||||
| 298 | 0 | my ( $module ) = @_ ; | |||||||||||||||||||||||||||||||||||||||||||||
| 299 | 0 | ▶ | return 1 if $MOD_LOADED{$module} ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | eval("require HDB::MOD::$module ;") ; | |||||||||||||||||||||||||||||||||||||||||||||
| 301 | 0 | ▶ | return undef if $@ ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | return $MOD_LOADED{$module} = 1 ; | |||||||||||||||||||||||||||||||||||||||||||||
| 303 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||||||||||
| 305 | ########### | ||||||||||||||||||||||||||||||||||||||||||||||
| 306 | # DESTROY # | ||||||||||||||||||||||||||||||||||||||||||||||
| 307 | ########### | ||||||||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||
| 310 | 0 | delete $PASS{$_[0]} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 311 | 0 | $_[0]->disconnect ; | |||||||||||||||||||||||||||||||||||||||||||||
| 312 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||||||||||
| 314 | ######### | ||||||||||||||||||||||||||||||||||||||||||||||
| 315 | # RESET # | ||||||||||||||||||||||||||||||||||||||||||||||
| 316 | ######### | ||||||||||||||||||||||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 1 | ▶ | sub RESET { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
RESET: called CC=11 SCAR=37.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 319 | 1 | ++$RESET_X ; | |||||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||||||
| 321 | 1 | ▶ | HDB::Object::RESET() if defined &HDB::Object::RESET && (!$WITH_HPL || $RESET_X > 10) ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition16%1/6
defined &HDB::Object::RESET and !$WITH_HPL || $RESET_X > 10
not $WITH_HPL or $RESET_X > 10
MC/DC0%0/3
defined &HDB::Object::RESET and !$WITH_HPL || $RESET_X > 10
defined &HDB::Object::RESET
not $WITH_HPL
$RESET_X > 10
Truth table25%1/4
A and not(B) or C
A= defined &HDB::Object::RESETB= not $WITH_HPLC= $RESET_X > 10
| |||||||||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||||||||
| 323 | 1 | ▶ | if ( $WITH_HPL ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 324 | 0 | my $hpl = &HPL_MAIN() ; | |||||||||||||||||||||||||||||||||||||||||||||
| 325 | 0 | ▶ | if ( $hpl ) { | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 326 | 0 | my $HDB_LINKED = \%{ $hpl->pack_root ."::MYHDB::DB"} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 327 | 0 | %$HDB_LINKED = () ; | |||||||||||||||||||||||||||||||||||||||||||||
| 328 | 0 | undef %$HDB_LINKED ; | |||||||||||||||||||||||||||||||||||||||||||||
| 329 | 0 | eval { | |||||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | foreach my $Key ( keys %$HDB_LINKED ) { $$HDB_LINKED{$Key}->UNLINK ;} | |||||||||||||||||||||||||||||||||||||||||||||
| 331 | }; | ||||||||||||||||||||||||||||||||||||||||||||||
| 332 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 333 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||||||||||||||||||||
| 335 | 1 | %DB = () ; | |||||||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||||||
| 337 | 1 | ▶ | HDB::Parser::RESET() if defined &HDB::Parser::RESET && (!$WITH_HPL || $RESET_X > 10) ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined &HDB::Parser::RESET and !$WITH_HPL || $RESET_X > 10
not $WITH_HPL or $RESET_X > 10
MC/DC0%0/3
defined &HDB::Parser::RESET and !$WITH_HPL || $RESET_X > 10
defined &HDB::Parser::RESET
not $WITH_HPL
$RESET_X > 10
Truth table25%1/4
A and not(B) or C
A= defined &HDB::Parser::RESETB= not $WITH_HPLC= $RESET_X > 10
| |||||||||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||||||||
| 339 | 1 | ▶ | $RESET_X = 0 if $RESET_X > 10 ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||
| 340 | |||||||||||||||||||||||||||||||||||||||||||||||
| 341 | 1 | return 1 ; | |||||||||||||||||||||||||||||||||||||||||||||
| 342 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||||||||||||||||||||
| 344 | 1 | ▶ | sub END { &RESET } | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
END: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 345 | |||||||||||||||||||||||||||||||||||||||||||||||
| 346 | ######### | ||||||||||||||||||||||||||||||||||||||||||||||
| 347 | # TABLE # | ||||||||||||||||||||||||||||||||||||||||||||||
| 348 | ######### | ||||||||||||||||||||||||||||||||||||||||||||||
| 349 | |||||||||||||||||||||||||||||||||||||||||||||||
| 350 | 0 | ▶ | sub TABLE { HDB::TABLE->new(@_) ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
TABLE: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||||||||||||||||||||
| 352 | ############## | ||||||||||||||||||||||||||||||||||||||||||||||
| 353 | # HDB::TABLE # | ||||||||||||||||||||||||||||||||||||||||||||||
| 354 | ############## | ||||||||||||||||||||||||||||||||||||||||||||||
| 355 | |||||||||||||||||||||||||||||||||||||||||||||||
| 356 | package HDB::TABLE ; | ||||||||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||||||
| 358 | 1 | ▶ | use vars qw($AUTOLOAD) ; | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 359 | |||||||||||||||||||||||||||||||||||||||||||||||
| 360 | ####### | ||||||||||||||||||||||||||||||||||||||||||||||
| 361 | # NEW # | ||||||||||||||||||||||||||||||||||||||||||||||
| 362 | ####### | ||||||||||||||||||||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||||||||||||||||||||
| 364 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||
| 365 | 0 | bless({ | |||||||||||||||||||||||||||||||||||||||||||||
| 366 | hdb => $_[1] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 367 | table => $_[2] , | ||||||||||||||||||||||||||||||||||||||||||||||
| 368 | },$_[0]) ; | ||||||||||||||||||||||||||||||||||||||||||||||
| 369 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 0 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||
| 372 | ##print main::STDOUT "DESTROY>> @_\n" ; | ||||||||||||||||||||||||||||||||||||||||||||||
| 373 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | ▶ | sub AUTOLOAD { | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
AUTOLOAD: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||
| 376 | 0 | my $obj = shift ; | |||||||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | my ($method) = ( $AUTOLOAD =~ /(\w+)$/s ) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | my $class = ref $obj->{hdb} ; | |||||||||||||||||||||||||||||||||||||||||||||
| 379 | 0 | return ($obj->{hdb})->$method($obj->{table} , @_) ; | |||||||||||||||||||||||||||||||||||||||||||||
| 380 | } | ||||||||||||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||||||||||
| 382 | ############# | ||||||||||||||||||||||||||||||||||||||||||||||
| 383 | # HDB::CMDS # | ||||||||||||||||||||||||||||||||||||||||||||||
| 384 | ############# | ||||||||||||||||||||||||||||||||||||||||||||||
| 385 | |||||||||||||||||||||||||||||||||||||||||||||||
| 386 | package HDB::CMDS ; | ||||||||||||||||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | ▶ | sub default_types { require HDB::CMDS ; &default_types ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
default_types: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 389 | 0 | ▶ | sub predefined_columns { require HDB::CMDS ; &predefined_columns ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
predefined_columns: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 390 | 0 | ▶ | sub default_mod { require HDB::CMDS ; &default_mod ;} | ||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
default_mod: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||||||||||||||||||||
| 392 | ####### | ||||||||||||||||||||||||||||||||||||||||||||||
| 393 | # END # | ||||||||||||||||||||||||||||||||||||||||||||||
| 394 | ####### | ||||||||||||||||||||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||||||||||||||||||||
| 396 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||||||||||||||||||||
| 398 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||