Primitive/Relation.pm

filter: Statementstmt 78.2% 18 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 1 / 1 totaltotal 75.0% 24 / 32 CC 2 SCAR 8.9
CC
2
Cov
72%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.4
« Primitive.pm ↑ Summary Primitive/Node.pm »
1 # Encoding and name #_{
2  
3 =encoding utf8
4 =head1 NAME
5  
6 Geo::OSM::Primitive::Relation - Abstract base class for the Open Street Map data primitive I<relation>.
7  
8 =cut
9 package Geo::OSM::Primitive::Relation;
10 1 our @ISA = qw(Geo::OSM::Primitive);
11 #_}
12 #_{ use …
13 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use Geo::OSM::Primitive;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 #_}
21 1 our $VERSION = 0.01;
22 #_{ Synopsis
23  
24 =head1 SYNOPSIS
25  
26 …
27  
28 =cut
29 #_}
30 #_{ Overview
31  
32 =head1 OVERVIEW
33  
34 The idea is to encapsulte methods that use OpenStreetMap data (that is possibly stored in L<Geo::OSM::DBI>.
35  
36 =cut
37  
38 #_}
39 #_{ Methods
40  
41 =head1 METHODS
42 =cut
43  
44 0 ▶sub new { #_{
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
45 #_{ POD
46  
47 =head2 new
48  
49 my $osm_rel = new($osm_relation_id);
50  
51 =cut
52  
53 #_}
54  
55 0 my $class = shift;
56 0 my $id = shift;
57  
58 0 my $self = $class->SUPER::new($id, 'rel');
59  
60 0 ▶ croak "Wrong class $class" unless $self->isa('Geo::OSM::Primitive::Relation');
Branch: 1 branch
BranchTrueFalseTotal
unless $self->isa("Geo::OSM::Primitive::Relation") 0 0 0
61  
62 0 return $self;
63  
64 } #_}
65  
66 #_}
67 #_{ POD: Copyright
68  
69 =head1 Copyright
70 Copyright © 2017 René Nyffenegger, Switzerland. All rights reserved.
71 This program is free software; you can redistribute it and/or modify it
72 under the terms of the the Artistic License (2.0). You may obtain a
73 copy of the full license at: L<http://www.perlfoundation.org/artistic_license_2_0>
74 =cut
75  
76 #_}
77 #_{ POD: Source Code
78  
79 =head1 Source Code
80  
81 The source code is on L<< github|https://github.com/ReneNyffenegger/perl-Geo-OSM-Primitive >>. Meaningful pull requests are welcome.
82  
83 =cut
84  
85 #_}
86  
87 1 'tq84';
« Primitive.pm ↑ Summary Primitive/Node.pm »