lib/OODoc/Text/Option.pm

filter: Statementstmt 53.5% 15 / 28 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 4 / 8 Podpod 75.0% 3 / 4 totaltotal 44.9% 22 / 49 CC 5 SCAR 25.9
CC
5
Cov
42%
init
30.0
publish
2.0
subroutine
2.0
CRAP 13.3
« lib/OODoc/Manifest.pm ↑ Summary lib/OODoc/Export/JSON.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::Option;{
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} ||= 'Option';
Condition0%0/2
$args->{"type"} ||= "Option"
l!l
00
MC/DC0%0/1
$args->{"type"} ||= "Option"
$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->{OTO_parameters} = delete $args->{parameters} or panic;
Branch: 1 branch
BranchTrueFalseTotal
$self->{"OTO_parameters"} = delete $args->{"parameters"} or &panic() 0 0 0
33 0 $self;
34 }
35  
36 sub publish($)
37 0 ▶{ my ($self, $args) = @_;
Subroutine publish: not called CC=1 SCAR=6.9
Pod documented
38 0 my $exporter = $args->{exporter};
39  
40 0 my $p = $self->SUPER::publish($args);
41 0 $p->{params} = $exporter->markupString($self->parameters);
42 0 $p;
43 }
44  
45 #--------------------
46  
47 0 ▶sub subroutine() { $_[0]->container }
Subroutine subroutine: not called CC=1 SCAR=6.9
Pod documented
48  
49  
50 0 ▶sub parameters() { $_[0]->{OTO_parameters} }
Subroutine parameters: not called CC=1 SCAR=6.9
Pod documented
51  
52 1 1;
« lib/OODoc/Manifest.pm ↑ Summary lib/OODoc/Export/JSON.pm »