File Coverage

lib/OODoc/Text/Diagnostic.pm
Criterion Covered Total %
statement 12 22 54.5
branch 0 2 0.0
condition 0 2 0.0
subroutine 4 7 57.1
pod 2 3 66.6
total 18 36 50.0


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::Diagnostic;{
13             our $VERSION = '3.05';
14             }
15              
16 1     1   1365 use parent 'OODoc::Text';
  1         3  
  1         8  
17              
18 1     1   105 use strict;
  1         38  
  1         28  
19 1     1   4 use warnings;
  1         2  
  1         62  
20              
21 1     1   5 use Log::Report 'oodoc';
  1         2  
  1         7  
22              
23             #--------------------
24              
25             sub init($)
26 0     0 0   { my ($self, $args) = @_;
27 0   0       $args->{type} ||= 'Diagnostic';
28 0 0         $args->{container} = delete $args->{subroutine} or panic;
29 0           $self->SUPER::init($args);
30             }
31              
32             sub publish($)
33 0     0 1   { my ($self, $args) = @_;
34 0           my $exporter = $args->{exporter};
35              
36 0           my $p = $self->SUPER::publish($args);
37 0           $p->{subroutine} = $self->subroutine->unique;
38 0           $p;
39             }
40              
41             #--------------------
42              
43 0     0 1   sub subroutine() { $_[0]->container }
44              
45             1;