Leaflet/Objects.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 2 / 2 totaltotal 87.1% 27 / 31 CC 3 SCAR 5.0
CC
3
Cov
87%
popup
2.0
tooltip
2.0
_method_name
2.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.04';
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 6 ▶sub popup {
Subroutine popup: called CC=2 SCAR=7.1
Pod documented
35 6 my $self = shift;
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 3 ▶sub tooltip {
Subroutine tooltip: called CC=2 SCAR=7.1
Pod documented
45 3 my $self = shift;
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 =cut
55  
56 0 ▶sub _method_name {die};
Subroutine _method_name: not called CC=1 SCAR=6.9
57  
58 =head2 JSON
59  
60 =head1 SEE ALSO
61  
62 =head1 AUTHOR
63  
64 Michael R. Davis
65  
66 =head1 COPYRIGHT AND LICENSE
67  
68 Copyright (C) 2024 by Michael R. Davis
69  
70 MIT LICENSE
71  
72 =cut
73  
74 2 1;
« Leaflet/TileLayer.pm ↑ Summary Leaflet/Polyline.pm »