| 1 | # Copyright © 2016 Guillem Jover <guillem@debian.org> | ||||||||||||||||||||
| 2 | # | ||||||||||||||||||||
| 3 | # This program is free software; you can redistribute it and/or modify | ||||||||||||||||||||
| 4 | # it under the terms of the GNU General Public License as published by | ||||||||||||||||||||
| 5 | # the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||
| 6 | # (at your option) any later version. | ||||||||||||||||||||
| 7 | # | ||||||||||||||||||||
| 8 | # This program is distributed in the hope that it will be useful, | ||||||||||||||||||||
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||||||||||||
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||||||||||||||||
| 11 | # GNU General Public License for more details. | ||||||||||||||||||||
| 12 | # | ||||||||||||||||||||
| 13 | # You should have received a copy of the GNU General Public License | ||||||||||||||||||||
| 14 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | =encoding utf8 | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | =head1 NAME | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | Dpkg::Control::Tests - parse files like debian/tests/control | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | =head1 DESCRIPTION | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | It provides a class to access data of files that follow the same | ||||||||||||||||||||
| 25 | syntax as F<debian/tests/control>. | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | =cut | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | package Dpkg::Control::Tests 1.00; | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 1 | ▶ | use v5.36; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 1 | ▶ | use Dpkg::Control; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 34 | 1 | ▶ | use Dpkg::Control::Tests::Entry; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 35 | 1 | ▶ | use Dpkg::Index; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 1 | ▶ | use parent qw(Dpkg::Index); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | =head1 METHODS | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | All the methods of L<Dpkg::Index> are available. Those listed below are either | ||||||||||||||||||||
| 42 | new or overridden with a different behavior. | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | =over 4 | ||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | =item $ctrl_tests = Dpkg::Control::Tests->new(%opts) | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | Create a new Dpkg::Control::Tests object, which inherits from L<Dpkg::Index>. | ||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | The options are passed through to the Dpkg::Index->new() constructor. | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | =cut | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.4
Pod
documented
| |||||||||||||||||||||
| 55 | 3 | my ($this, %opts) = @_; | |||||||||||||||||||
| 56 | 3 | ▶ | my $class = ref($this) || $this; | ||||||||||||||||||
|
Condition33%1/3
ref $this || $this
MC/DC0%0/2
ref $this || $this
ref $this
$this
Truth table33%1/3
A || B
A= ref $thisB= $this
| |||||||||||||||||||||
| 57 | 3 | my $self = Dpkg::Index->new( | |||||||||||||||||||
| 58 | type => CTRL_TESTS, | ||||||||||||||||||||
| 59 | %opts, | ||||||||||||||||||||
| 60 | ); | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | 3 | return bless $self, $class; | |||||||||||||||||||
| 63 | } | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | =item $item = $ctrl_tests->new_item() | ||||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | Creates a new item. | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | =cut | ||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 12 | ▶ | sub new_item { | ||||||||||||||||||
|
Subroutine
new_item: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 72 | 12 | my $self = shift; | |||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | 12 | return Dpkg::Control::Tests::Entry->new(); | |||||||||||||||||||
| 75 | } | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | =back | ||||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | =head1 CHANGES | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | =head2 Version 1.00 (dpkg 1.18.8) | ||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | Mark the module as public. | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | =cut | ||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 1 | 1; | |||||||||||||||||||