lib/XML/Compile/C14N/Util.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 34 / 34 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/XML/Compile/C14N/Util.pm ↑ Summary
1 # Copyrights 2011-2014 by [Mark Overmeer].
2 # For other contributors see ChangeLog.
3 # See the manual pages for details on the licensing terms.
4 # Pod stripped from pm file by OODoc 2.01.
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 package XML::Compile::C14N::Util;
9 3 our $VERSION = '0.94';
10  
11 3 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 my @c14n = qw/
14 C14N_v10_NO_COMM
15 C14N_v10_COMMENTS
16 C14N_v11_NO_COMM
17 C14N_v11_COMMENTS
18 C14N_EXC_NO_COMM
19 C14N_EXC_COMMENTS
20 C14N_EXC_NS
21 /;
22  
23 3 my @paths = qw/
24 C14N10
25 C14N11
26 C14NEXC
27 is_canon_constant
28 /;
29  
30 3 our @EXPORT = qw/C14N_EXC_NS/;
31 3 our @EXPORT_OK = (@c14n, @paths);
32  
33 3 our %EXPORT_TAGS =
34 ( c14n => \@c14n
35 , paths => \@paths
36 );
37  
38  
39 # Path components
40 use constant
41 3 { C14N10 => 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315'
42 , C14N11 => 'http://www.w3.org/2006/12/xml-c14n11'
43 , C14NEXC => 'http://www.w3.org/2001/10/xml-exc-c14n'
44 3 ▶ };
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46  
47 use constant
48 3 { C14N_v10_NO_COMM => C14N10
49 , C14N_v10_COMMENTS => C14N10. '#WithComments'
50 , C14N_v11_NO_COMM => C14N11
51 , C14N_v11_COMMENTS => C14N11. '#WithComments'
52 , C14N_EXC_NO_COMM => C14NEXC.'#'
53 , C14N_EXC_COMMENTS => C14NEXC.'#WithComments'
54 , C14N_EXC_NS => C14NEXC.'#'
55 3 ▶ };
Subroutine BEGIN: called CC=1 SCAR=0.0
56  
57  
58 3 my $is_canon = qr/^(?:\Q${\C14N10}\E|\Q${\C14N11}\E|\Q${\C14NEXC}\E)\b/;
59 8 ▶sub is_canon_constant($) { $_[0] =~ $is_canon }
Subroutine is_canon_constant: called CC=1 SCAR=0.0
Pod documented
60  
61 3 1;
« blib/lib/XML/Compile/C14N/Util.pm ↑ Summary