File Coverage

lib/Data/TagDB/Relation.pm
Criterion Covered Total %
statement 14 18 77.7
branch n/a
condition n/a
subroutine 5 7 71.4
pod 2 2 100.0
total 21 27 77.7


line stmt bran cond sub pod time code
1             # Copyright (c) 2024-2025 Philipp Schafft
2              
3             # licensed under Artistic License 2.0 (see LICENSE file)
4              
5             # ABSTRACT: Work with Tag databases
6              
7             package Data::TagDB::Relation;
8              
9 1     1   15 use v5.10;
  1         4  
10 1     1   7 use strict;
  1         2  
  1         47  
11 1     1   6 use warnings;
  1         2  
  1         69  
12              
13 1     1   6 use parent 'Data::TagDB::Link';
  1         3  
  1         10  
14              
15 1     1   66 use Carp;
  1         3  
  1         171  
16              
17             our $VERSION = v0.12;
18              
19              
20              
21             sub filter {
22 0     0 1   my ($self) = @_;
23 0           return $self->{filter};
24             }
25              
26             sub related {
27 0     0 1   my ($self) = @_;
28 0           return $self->{related};
29             }
30              
31             1;
32              
33             __END__
34              
35             =pod
36              
37             =encoding UTF-8
38              
39             =head1 NAME
40              
41             Data::TagDB::Relation - Work with Tag databases
42              
43             =head1 VERSION
44              
45             version v0.12
46              
47             =head1 SYNOPSIS
48              
49             use Data::TagDB;
50              
51             Package of relations. Inherits from L<Data::TagDB::Link>.
52              
53             =head1 METHODS
54              
55             =head2 filter, related
56              
57             my Data::TagDB::Tag $db = $link->filter;
58             my Data::TagDB::Tag $db = $link->related;
59              
60             Returns the corresponding filter, or related. Returns undef if not set.
61              
62             =head1 AUTHOR
63              
64             Philipp Schafft <lion@cpan.org>
65              
66             =head1 COPYRIGHT AND LICENSE
67              
68             This software is Copyright (c) 2024-2025 by Philipp Schafft <lion@cpan.org>.
69              
70             This is free software, licensed under:
71              
72             The Artistic License 2.0 (GPL Compatible)
73              
74             =cut