lib/App/LinkSite/Section.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« t/file-parameter.t ↑ Summary
1 =head1 NAME
2  
3 App::LinkSite::Section
4  
5 =head1 SYNOPSIS
6  
7 (You probably want to just look at the L<linksite> application.)
8  
9 =head1 DESCRIPTION
10  
11 A class to model a section of links on a link site (part of App::LinkSite).
12  
13 =cut
14  
15 17 ▶use Feature::Compat::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 17 class App::LinkSite::Section {
18 17 our $VERSION = '0.2.0';
19 17 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 17 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 17 ▶ no if $] >= 5.038, 'warnings', 'experimental::class';
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 17 field $title :reader :param;
24 17 field $links :reader :param = [];
25  
26 =head1 METHODS
27  
28 =head2 has_links
29  
30 Returns true if this section has any links.
31  
32 =cut
33  
34 6 ▶ method has_links {
Subroutine has_links: called CC=1 SCAR=0.0
Pod documented
35 6 return scalar @$links > 0;
36 }
37 }
38  
39 =head1 AUTHOR
40  
41 Dave Cross <dave@davecross.co.uk>
42  
43 =head1 COPYRIGHT AND LICENCE
44  
45 Copyright (c) 2024, Magnum Solutions Ltd. All Rights Reserved.
46  
47 This library is free software; you can redistribute it and/or modify it
48 under the same terms as Perl itself.
49  
50 =cut
51  
52 17 1;
« t/file-parameter.t ↑ Summary