Spore/Middleware/Format/XML.pm

filter: Statementstmt 73.9% 17 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 4 / 4 totaltotal 75.7% 25 / 33 CC 1 SCAR 2.9
CC
1
Cov
74%
content_type
2.0
encode
2.0
BEGIN
1.0
CRAP 1.3
« Spore/Middleware/Auth.pm ↑ Summary Spore/Middleware/Format/YAML.pm »
1 package Net::HTTP::Spore::Middleware::Format::XML;
2 2 $Net::HTTP::Spore::Middleware::Format::XML::VERSION = '0.09';
3 # ABSTRACT: middleware for XML format
4  
5 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 extends 'Net::HTTP::Spore::Middleware::Format';
7  
8 2 ▶use XML::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 my @KnownOptIn = qw(keyattr keeproot forcecontent contentkey noattr
11 searchpath forcearray cache suppressempty parseropts
12 grouptags nsexpand datahandler varattr variables
13 normalisespace normalizespace valueattr);
14  
15 2 my @KnownOptOut = qw(keyattr keeproot contentkey noattr
16 rootname xmldecl outputfile noescape suppressempty
17 grouptags nsexpand handler noindent attrindent nosort
18 valueattr numericescape);
19  
20 1 ▶sub accept_type { ( 'Accept' => 'text/xml' ); }
Subroutine accept_type: called CC=1 SCAR=0.0
Pod documented
21 0 ▶sub content_type { ( 'Content-Type' => 'text/xml' ) }
Subroutine content_type: not called CC=1 SCAR=6.9
Pod documented
22 0 ▶sub encode { my $mw = $_[0];
Subroutine encode: not called CC=1 SCAR=6.9
Pod documented
23 0 my @args = map { $_ => $mw->{$_} } grep { $mw->{$_} } @KnownOptOut;
24 0 XMLout( $_[1], @args ) }
25 1 ▶sub decode { my $mw = $_[0];
Subroutine decode: called CC=1 SCAR=0.0
Pod documented
26 1 my @args = map { $_ => $mw->{$_} } grep { $mw->{$_} } @KnownOptIn;
27 1 XMLin( $_[1], @args ) }
28  
29 2 1;
30  
31 __END__
« Spore/Middleware/Auth.pm ↑ Summary Spore/Middleware/Format/YAML.pm »