File Coverage

blib/lib/Log/Agent.pm
Criterion Covered Total %
statement 86 100 86.0
branch 45 62 72.5
condition 6 15 40.0
subroutine 14 14 100.0
pod 5 7 71.4
total 156 198 78.7


line stmt bran cond sub pod time code
1             ###########################################################################
2             #
3             # Agent.pm
4             #
5             # Copyright (C) 1999 Raphael Manfredi.
6             # Copyright (C) 2002-2015 Mark Rogaski, mrogaski@cpan.org;
7             # all rights reserved.
8             #
9             # See the README file included with the
10             # distribution for license information.
11             #
12             ###########################################################################
13              
14 14     14   44191 use strict;
  14         27  
  14         714  
15             require Exporter;
16              
17             ########################################################################
18             package Log::Agent;
19              
20 14         1786 use vars qw($Driver $Prefix $Trace $Debug $Confess
21 14     14   69 $OS_Error $AUTOLOAD $Caller $Priorities $Tags $DATUM %prio_cache);
  14         28  
22              
23 14     14   11202 use AutoLoader;
  14         20956  
  14         78  
24 14     14   479 use vars qw(@ISA @EXPORT @EXPORT_OK);
  14         28  
  14         1200  
25              
26             @ISA = qw(Exporter);
27             @EXPORT = qw(
28             logconfig
29             logconfess logcroak logcarp logxcroak logxcarp
30             logsay logerr logwarn logdie logtrc logdbg
31             );
32             @EXPORT_OK = qw(
33             logwrite logtags
34             );
35              
36 14     14   7051 use Log::Agent::Priorities qw(:LEVELS priority_level level_from_prio);
  14         32  
  14         2544  
37 14     14   7129 use Log::Agent::Formatting qw(tag_format_args);
  14         40  
  14         1937  
38              
39             our $VERSION = '1.001';
40             $VERSION = eval $VERSION;
41              
42             $Trace = NOTICE; # Default tracing
43             $OS_Error = ''; # Data stash for the $! value
44              
45             sub AUTOLOAD {
46 61     61   11120 ${Log::Agent::OS_Error} = $!; # for safe-keeping, the braces
47             # prevent CVS substitution
48 61         111 $AutoLoader::AUTOLOAD = $AUTOLOAD;
49 61         232 goto &AutoLoader::AUTOLOAD;
50             }
51              
52             1;
53             __END__