lib/XML/Compile/XOP.pm

filter: Statementstmt 94.4% 34 / 36 Branchbran n/a Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 90.9% 10 / 11 Podpod 75.0% 3 / 4 totaltotal 83.3% 50 / 60 CC 4 SCAR 6.9
CC
4
Cov
88%
init
4.2
file
2.0
BEGIN
1.0
CRAP 2.0
« lib/XML/Compile/XOP/Include.pm ↑ Summary blib/lib/XML/Compile/Operation.pm »
1 # Copyrights 2007-2022 by [Mark Overmeer <markov@cpan.org>].
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.03.
5 # This code is part of distribution XML-Compile-SOAP. Meta-POD processed
6 # with OODoc into POD and HTML manual-pages. See README.md
7 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
8  
9 package XML::Compile::XOP;
10 2 ▶use vars '$VERSION';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 $VERSION = '3.28';
12  
13  
14 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 2 ▶use Log::Report 'xml-compile-soap';
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 2 ▶use XML::Compile::SOAP::Util qw/:xop10/;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶use XML::Compile::XOP::Include ();
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 XML::Compile->addSchemaDirs(__FILE__);
23 2 XML::Compile->knownNamespace
24 ( &XMIME10 => '200411-xmlmime.xsd'
25 , &XMIME11 => '200505-xmlmime.xsd'
26 );
27  
28  
29 1 ▶sub new(@) { my $class = shift; (bless {})->init( {@_} ) }
Subroutine new: called CC=1 SCAR=0.0
Pod documented
30  
31 sub init($)
32 1 ▶{ my ($self, $args) = @_;
Subroutine init: called CC=4 SCAR=14.5
Pod undocumented
33  
34 1 ▶ $self->{XCX_xmime} = $args->{xmlmime_version} || XMIME11;
Condition50%1/2
$args->{'xmlmime_version'} || 'http://www.w3.org/2005/05/xmlmime'
l!l
01
MC/DC0%0/1
$args->{'xmlmime_version'} || 'http://www.w3.org/2005/05/xmlmime'
$args->{'xmlmime_version'}
Truth table50%1/2
A
A= $args->{'xmlmime_version'}
Aresult
11
00
35 1 ▶ $self->{XCX_xop} = $args->{xop_version} || XOP10;
Condition50%1/2
$args->{'xop_version'} || 'http://www.w3.org/2004/08/xop/include'
l!l
01
MC/DC0%0/1
$args->{'xop_version'} || 'http://www.w3.org/2004/08/xop/include'
$args->{'xop_version'}
Truth table50%1/2
A
A= $args->{'xop_version'}
Aresult
11
00
36 1 ▶ $self->{XCX_host} = $args->{hostname} || 'localhost';
Condition50%1/2
$args->{'hostname'} || 'localhost'
l!l
01
MC/DC0%0/1
$args->{'hostname'} || 'localhost'
$args->{'hostname'}
Truth table50%1/2
A
A= $args->{'hostname'}
Aresult
11
00
37 1 $self->{XCX_cid} = time;
38 1 $self;
39 }
40  
41  
42 sub _include(@)
43 1 ▶{ my $self = shift;
Subroutine _include: called CC=1 SCAR=0.0
44 XML::Compile::XOP::Include->new
45 ( cid => $self->{XCX_cid}++ . '@' . $self->{XCX_host}
46 , xmime => $self->{XCX_xmime}
47 , xop => $self->{XCX_xop}
48 1 , type => 'application/octet-stream'
49 , @_
50 );
51 }
52 0 ▶sub file(@) { my $self = shift; $self->_include(file => @_) }
Subroutine file: not called CC=1 SCAR=6.9
Pod documented
53 1 ▶sub bytes(@) { my $self = shift; $self->_include(bytes => @_) }
Subroutine bytes: called CC=1 SCAR=0.0
Pod documented
54  
55  
56 2 1;
« lib/XML/Compile/XOP/Include.pm ↑ Summary blib/lib/XML/Compile/Operation.pm »