| 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::Index;{ | ||||||||||||||||||||||||||||
| 13 | 1 | our $VERSION = '3.05'; | |||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 1 | ▶ | use parent 'OODoc::Object'; | ||||||||||||||||||||||||||
|
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 | 1 | ▶ | use List::Util qw/first/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | #-------------------- | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | sub init($) | ||||||||||||||||||||||||||||
| 28 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
init: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 29 | 0 | $self->SUPER::init($args); | |||||||||||||||||||||||||||
| 30 | 0 | $self->{OI_pkgs} = {}; | |||||||||||||||||||||||||||
| 31 | 0 | $self->{OI_mans} = {}; | |||||||||||||||||||||||||||
| 32 | 0 | $self; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | #-------------------- | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 0 | ▶ | sub _packages() { $_[0]->{OI_pkgs} } | ||||||||||||||||||||||||||
|
Subroutine
_packages: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 38 | 0 | ▶ | sub _manuals() { $_[0]->{OI_mans} } | ||||||||||||||||||||||||||
|
Subroutine
_manuals: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | #-------------------- | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | sub addManual($) | ||||||||||||||||||||||||||||
| 43 | 0 | ▶ | { my ($self, $manual) = @_; | ||||||||||||||||||||||||||
|
Subroutine
addManual: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 0 | ▶ | ref $manual && $manual->isa('OODoc::Manual') | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $manual and $manual->isa("OODoc::Manual")
MC/DC0%0/2
ref $manual and $manual->isa("OODoc::Manual")
ref $manual
$manual->isa("OODoc::Manual")
Truth table0%0/3
A and B
A= ref $manualB= $manual->isa("OODoc::Manual")
| |||||||||||||||||||||||||||||
| 46 | or panic "manual definition requires manual object"; | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 0 | push @{$self->_packages->{$manual->package}}, $manual; | |||||||||||||||||||||||||||
| 49 | 0 | $self->_manuals->{$manual->name} = $manual; | |||||||||||||||||||||||||||
| 50 | 0 | $self; | |||||||||||||||||||||||||||
| 51 | } | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | sub mainManual($) | ||||||||||||||||||||||||||||
| 55 | 0 | ▶ | { my ($self, $name) = @_; | ||||||||||||||||||||||||||
|
Subroutine
mainManual: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 56 | 0 | ▶ | first { $_ eq $_->package } $self->manualsForPackage($name); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | sub manualsForPackage($) | ||||||||||||||||||||||||||||
| 61 | 0 | ▶ | { my ($self, $name) = @_; | ||||||||||||||||||||||||||
|
Subroutine
manualsForPackage: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 62 | 0 | ▶ | @{$self->_packages->{$name || 'doc'} || []}; | ||||||||||||||||||||||||||
|
Condition0%0/4
$self->_packages->{$name or 'doc'} || []
$name || 'doc'
MC/DC0%0/1
$self->_packages->{$name or 'doc'} || []
$self->_packages->{$name or 'doc'}
MC/DC0%0/1
$name || 'doc'
$name
Truth table0%0/2
A
A= $self->_packages->{$name or 'doc'}
Truth table0%0/2
A
A= $name
| |||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | 0 | ▶ | sub manuals() { values %{$_[0]->_manuals} } | ||||||||||||||||||||||||||
|
Subroutine
manuals: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | 0 | ▶ | sub findManual($) { $_[0]->_manuals->{ $_[1] } } | ||||||||||||||||||||||||||
|
Subroutine
findManual: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | 0 | ▶ | sub packageNames() { keys %{$_[0]->_packages} } | ||||||||||||||||||||||||||
|
Subroutine
packageNames: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | 1 | 1; | |||||||||||||||||||||||||||