blib/lib/Log/Syslog/Fast/Constants.pm

filter: Statementstmt 97.6% 42 / 43 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 11 / 11 Podpod n/a totaltotal 96.4% 54 / 56 CC 2 SCAR 1.8
CC
2
Cov
96%
AUTOLOAD
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Log/Syslog/Fast/PP.pm ↑ Summary const-c.inc »
1 package Log::Syslog::Fast::Constants;
2  
3 18 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 18 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 18 ▶use Log::Syslog::Constants ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 18 ▶use Carp 'croak';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 18 require Exporter;
10 18 our @ISA = qw(Exporter);
11  
12 # protocols
13 18 ▶use constant LOG_UDP => 0; # UDP
Subroutine BEGIN: called CC=1 SCAR=0.0
14 18 ▶use constant LOG_TCP => 1; # TCP
Subroutine BEGIN: called CC=1 SCAR=0.0
15 18 ▶use constant LOG_UNIX => 2; # UNIX socket
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 # formats
18 18 ▶use constant LOG_RFC3164 => 0;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 18 ▶use constant LOG_RFC5424 => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 18 ▶use constant LOG_RFC3164_LOCAL => 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 18 our @EXPORT = ();
23 18 our %EXPORT_TAGS = (
24 protos => [qw/ LOG_TCP LOG_UDP LOG_UNIX /],
25 formats => [qw/ LOG_RFC3164 LOG_RFC5424 LOG_RFC3164_LOCAL /],
26 );
27 $EXPORT_TAGS{$_} = $Log::Syslog::Constants::EXPORT_TAGS{$_}
28 18 for qw(facilities severities);
29 18 our @EXPORT_OK = @{ $EXPORT_TAGS{all} } = map {@$_} values %EXPORT_TAGS;
30  
31 40 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=2 SCAR=7.6
32 40 (my $meth = our $AUTOLOAD) =~ s/.*:://;
33 40 ▶ if (Log::Syslog::Constants->can($meth)) {
Branch: 1 branch
BranchTrueFalseTotal
if ("Log::Syslog::Constants"->can($meth)) 40 0 40
34 40 return Log::Syslog::Constants->$meth(@_);
35 }
36 0 croak "Undefined subroutine $AUTOLOAD";
37 }
38  
39 18 1;
« blib/lib/Log/Syslog/Fast/PP.pm ↑ Summary const-c.inc »