lib/OODoc/Text/Default.pm

filter: Statementstmt 50.0% 15 / 30 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 44.4% 4 / 9 Podpod 75.0% 3 / 4 totaltotal 42.3% 22 / 52 CC 5 SCAR 25.2
CC
5
Cov
39%
init
30.0
publish
2.0
subroutine
2.0
CRAP 12.5
« lib/OODoc/Text/Structure.pm ↑ Summary lib/OODoc/Text/SubSubSection.pm »
1 # This code is part of Perl distribution OODoc version 3.05.
2 # The POD got stripped from this file by OODoc version 3.05.
3 # For contributors see file ChangeLog.
4  
5 # This software is copyright (c) 2003-2025 by Mark Overmeer.
6  
7 # This is free software; you can redistribute it and/or modify it under
8 # the same terms as the Perl 5 programming language system itself.
9 # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later
10  
11  
12 package OODoc::Text::Default;{
13 1 our $VERSION = '3.05';
14 }
15  
16 1 ▶use parent 'OODoc::Text';
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 1 ▶use Log::Report 'oodoc';
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 #--------------------
24  
25 sub init($)
26 0 ▶{ my ($self, $args) = @_;
Subroutine init: not called CC=5 SCAR=34.0
Pod undocumented
27 0 ▶ $args->{type} ||= 'Default';
Condition0%0/2
$args->{"type"} ||= "Default"
l!l
00
MC/DC0%0/1
$args->{"type"} ||= "Default"
$args->{"type"}
Truth table0%0/2
A
A= $args->{"type"}
Aresult
11
00
28 0 ▶ $args->{container} = delete $args->{subroutine} or panic;
Branch: 1 branch
BranchTrueFalseTotal
$args->{"container"} = delete $args->{"subroutine"} or &panic() 0 0 0
29  
30 0 ▶ $self->SUPER::init($args) or return;
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init($args) or return 0 0 0
31  
32 0 $self->{OTD_value} = delete $args->{value};
33 0 ▶ defined $self->{OTD_value} or panic;
Branch: 1 branch
BranchTrueFalseTotal
defined $self->{"OTD_value"} or &panic() 0 0 0
34  
35 0 $self;
36 }
37  
38 sub publish($)
39 0 ▶{ my ($self, $args) = @_;
Subroutine publish: not called CC=1 SCAR=6.9
Pod documented
40 0 my $exporter = $args->{exporter};
41  
42 0 my $p = $self->SUPER::publish($args);
43 0 $p->{value} = $exporter->markupString($self->value);
44 0 $p;
45 }
46  
47 #--------------------
48  
49 0 ▶sub subroutine() { $_[0]->container }
Subroutine subroutine: not called CC=1 SCAR=6.9
Pod documented
50  
51  
52 0 ▶sub value() { $_[0]->{OTD_value} }
Subroutine value: not called CC=1 SCAR=6.9
Pod documented
53 0 ▶sub _setValue() { $_[0]->{OTD_value} = $_[1] }
Subroutine _setValue: not called CC=1 SCAR=6.9
54  
55 1 1;
« lib/OODoc/Text/Structure.pm ↑ Summary lib/OODoc/Text/SubSubSection.pm »