| 1 | # | ||||||||||||
| 2 | # $Id: Utils.pm,v 1.3 2003/12/24 20:38:54 oratrc Exp $ | ||||||||||||
| 3 | # | ||||||||||||
| 4 | package Oracle::Trace::Utils; | ||||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use 5.008001; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 1 | ▶ | use Data::Dumper; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | |||||||||||||
| 11 | 1 | our $VERSION = do { my @r = (q$Revision: 1.3 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; | |||||||||||
| 12 | |||||||||||||
| 13 | 1 | ▶ | my $DEBUG = $ENV{Oracle_Trace_DEBUG} || 0; | ||||||||||
|
Condition50%1/2
$ENV{'Oracle_Trace_DEBUG'} || 0
MC/DC0%0/1
$ENV{'Oracle_Trace_DEBUG'} || 0
$ENV{'Oracle_Trace_DEBUG'}
Truth table50%1/2
A
A= $ENV{'Oracle_Trace_DEBUG'}
| |||||||||||||
| 14 | |||||||||||||
| 15 | =item fatal | ||||||||||||
| 16 | |||||||||||||
| 17 | Die with a message | ||||||||||||
| 18 | |||||||||||||
| 19 | $o_util->fatal($msg); | ||||||||||||
| 20 | |||||||||||||
| 21 | =cut | ||||||||||||
| 22 | |||||||||||||
| 23 | 0 | ▶ | sub fatal { | ||||||||||
|
Subroutine
fatal: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 24 | 0 | shift; | |||||||||||
| 25 | 0 | die(@_); | |||||||||||
| 26 | }; | ||||||||||||
| 27 | |||||||||||||
| 28 | =item error | ||||||||||||
| 29 | |||||||||||||
| 30 | Warn with a message | ||||||||||||
| 31 | |||||||||||||
| 32 | $o_util->warn($msg); | ||||||||||||
| 33 | |||||||||||||
| 34 | =cut | ||||||||||||
| 35 | |||||||||||||
| 36 | 0 | ▶ | sub error { | ||||||||||
|
Subroutine
error: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 37 | 0 | shift; | |||||||||||
| 38 | 0 | warn(@_); | |||||||||||
| 39 | }; | ||||||||||||
| 40 | |||||||||||||
| 41 | =item debug | ||||||||||||
| 42 | |||||||||||||
| 43 | Exude a debugging message. | ||||||||||||
| 44 | |||||||||||||
| 45 | $o_util->debug($msg) if $DEBUG >= 2; | ||||||||||||
| 46 | |||||||||||||
| 47 | =cut | ||||||||||||
| 48 | |||||||||||||
| 49 | |||||||||||||
| 50 | 0 | ▶ | sub debug { | ||||||||||
|
Subroutine
debug: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 51 | 0 | my $self = shift; | |||||||||||
| 52 | 0 | print(ref($self).": @_\n"); | |||||||||||
| 53 | }; | ||||||||||||
| 54 | |||||||||||||
| 55 | 1 | 1; | |||||||||||
| 56 | __END__ | ||||||||||||