File Coverage

blib/lib/Net/DRI/Logging/Stderr.pm
Criterion Covered Total %
statement 12 19 63.1
branch 0 2 0.0
condition n/a
subroutine 4 7 57.1
pod 3 3 100.0
total 19 31 61.2


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, STDERR Logging operations for Net::DRI
2             ##
3             ## Copyright (c) 2009 Patrick Mevzek . All rights reserved.
4             ##
5             ## This file is part of Net::DRI
6             ##
7             ## Net::DRI is free software; you can redistribute it and/or modify
8             ## it under the terms of the GNU General Public License as published by
9             ## the Free Software Foundation; either version 2 of the License, or
10             ## (at your option) any later version.
11             ##
12             ## See the LICENSE file that comes with this distribution for more details.
13             ####################################################################################################
14              
15             package Net::DRI::Logging::Stderr;
16              
17 1     1   757 use strict;
  1         2  
  1         37  
18 1     1   4 use warnings;
  1         1  
  1         25  
19              
20 1     1   3 use base qw/Net::DRI::Logging/;
  1         2  
  1         63  
21              
22 1     1   4 use IO::Handle;
  1         2  
  1         130  
23              
24             *STDERR->autoflush();
25              
26             ####################################################################################################
27              
28 0     0 1   sub name { return 'stderr'; }
29 0     0 1   sub setup_channel { my ($self,$source,$type,$data)=@_; return; } ## nothing to do really
  0            
30              
31             sub output
32             {
33 0     0 1   my ($self,$level,$type,$data)=@_;
34 0 0         if ($self->should_log($level)) { *STDERR->print($self->tostring($level,$type,$data),"\n"); }
  0            
35 0           return;
36             }
37              
38             ####################################################################################################
39             1;
40              
41             __END__