blib/lib/XML/Loy/HostMeta.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 2 / 2 totaltotal 100% 32 / 32 CC 3 SCAR 5.6
CC
3
Cov
100%
host
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« lib/XML/Loy/OStatus.pm ↑ Summary blib/lib/Test/XML/Loy.pm »
1 package XML::Loy::HostMeta;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use XML::Loy with => (
Subroutine BEGIN: called CC=1 SCAR=0.0
6 prefix => 'hm',
7 namespace => 'http://host-meta.net/xrd/1.0'
8 2 );
9  
10 2 ▶use Carp qw/carp/;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 # No constructor
13 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
14 1 carp 'Only use ' . __PACKAGE__ . ' as an extension to XRD';
15 1 return;
16 };
17  
18 # host information
19 3 ▶sub host {
Subroutine host: called CC=3 SCAR=11.0
Pod documented
20 3 my $self = shift->root->at('*');
21  
22 3 ▶ unless ($_[0]) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($_[0]) 2 1 3
23 2 ▶ my $h = $self->at('Host') or return;
Branch: 1 branch
BranchTrueFalseTotal
my $h = $self->at("Host") or return 1 1 2
24 1 return $h->all_text;
25 };
26  
27 # Set hist information
28 1 return $self->set(Host => shift);
29 };
30  
31  
32 2 1;
33  
34  
35 __END__
« lib/XML/Loy/OStatus.pm ↑ Summary blib/lib/Test/XML/Loy.pm »