Leaflet/Objects.pm

filter: Statementstmt 100% 18 / 18 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 93.1% 27 / 29 CC 3 SCAR 4.6
CC
3
Cov
91%
popup
2.0
tooltip
2.0
BEGIN
1.0
CRAP 1.6
« Leaflet/tileLayer.pm ↑ Summary Leaflet/polyline.pm »
1 package Geo::Leaflet::Objects;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use base qw{Geo::Leaflet::Base};
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.03';
7 2 our $PACKAGE = __PACKAGE__;
8  
9 =head1 NAME
10  
11 Geo::Leaflet::Objects - Leaflet object base package
12  
13 =head1 SYNOPSIS
14  
15 use Geo::Leaflet;
16 my $map = Geo::Leaflet->new;
17  
18 =head1 DESCRIPTION
19  
20 This package provides a base package for L<Geo::Leaflet> map objects that supports popups and tooltips.
21  
22 =head1 CONSTRUCTORS
23  
24 =head2 new
25
26 =head1 PROPERTIES
27  
28 =head2 options
29  
30 =head2 popup
31  
32 =cut
33  
34 sub popup {
35 6 ▶ my $self = shift;
Subroutine popup: called CC=2 SCAR=7.1
Pod documented
36 6 ▶ $self->{'popup'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 6 6
37 6 return $self->{'popup'};
38 }
39  
40 =head2 tooltip
41  
42 =cut
43  
44 sub tooltip {
45 3 ▶ my $self = shift;
Subroutine tooltip: called CC=2 SCAR=7.1
Pod documented
46 3 ▶ $self->{'tooltip'} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 3 3
47 3 return $self->{'tooltip'};
48 }
49  
50 =head1 METHODS
51  
52 =head2 stringify_base
53  
54 =head2 JSON
55  
56 =head1 SEE ALSO
57  
58 =head1 AUTHOR
59  
60 Michael R. Davis
61  
62 =head1 COPYRIGHT AND LICENSE
63  
64 Copyright (C) 2024 by Michael R. Davis
65  
66 MIT LICENSE
67  
68 =cut
69  
70 2 1;
« Leaflet/tileLayer.pm ↑ Summary Leaflet/polyline.pm »