File Coverage

lib/OODoc/Text/Default.pm
Criterion Covered Total %
statement 12 27 44.4
branch 0 6 0.0
condition 0 2 0.0
subroutine 4 9 44.4
pod 3 4 75.0
total 19 48 39.5


line stmt bran cond sub pod time code
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             our $VERSION = '3.05';
14             }
15              
16 1     1   1355 use parent 'OODoc::Text';
  1         2  
  1         14  
17              
18 1     1   105 use strict;
  1         3  
  1         27  
19 1     1   4 use warnings;
  1         3  
  1         60  
20              
21 1     1   4 use Log::Report 'oodoc';
  1         3  
  1         7  
22              
23             #--------------------
24              
25             sub init($)
26 0     0 0   { my ($self, $args) = @_;
27 0   0       $args->{type} ||= 'Default';
28 0 0         $args->{container} = delete $args->{subroutine} or panic;
29              
30 0 0         $self->SUPER::init($args) or return;
31              
32 0           $self->{OTD_value} = delete $args->{value};
33 0 0         defined $self->{OTD_value} or panic;
34              
35 0           $self;
36             }
37              
38             sub publish($)
39 0     0 1   { my ($self, $args) = @_;
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     0 1   sub subroutine() { $_[0]->container }
50              
51              
52 0     0 1   sub value() { $_[0]->{OTD_value} }
53 0     0     sub _setValue() { $_[0]->{OTD_value} = $_[1] }
54              
55             1;