File Coverage

blib/lib/Oracle/Trace/Utils.pm
Criterion Covered Total %
statement 12 18 66.6
branch n/a
condition n/a
subroutine 4 7 57.1
pod 3 3 100.0
total 19 28 67.8


line stmt bran cond sub pod time code
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     1   17 use 5.008001;
  1         5  
  1         47  
7 1     1   6 use strict;
  1         1  
  1         26  
8 1     1   5 use warnings;
  1         2  
  1         32  
9 1     1   5 use Data::Dumper;
  1         2  
  1         230  
10              
11             our $VERSION = do { my @r = (q$Revision: 1.3 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
12              
13             my $DEBUG = $ENV{Oracle_Trace_DEBUG} || 0;
14              
15             =item fatal
16              
17             Die with a message
18              
19             $o_util->fatal($msg);
20              
21             =cut
22              
23             sub fatal {
24 0     0 1   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             sub error {
37 0     0 1   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             sub debug {
51 0     0 1   my $self = shift;
52 0           print(ref($self).": @_\n");
53             };
54              
55             1;
56             __END__