MapFeatures/Feature/Type.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 4 / 6 Podpod 50.0% 1 / 2 totaltotal 57.1% 20 / 35 CC 2 SCAR 9.4
CC
2
Cov
60%
new
6.0
stringify
2.0
BEGIN
1.0
CRAP 2.6
« MapFeatures/Feature/Key.pm ↑ Summary MapFeatures/Feature/Value/List.pm »
1 package Geo::OSM::MapFeatures::Feature::Type;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use base qw(Class::Accessor);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 __PACKAGE__->mk_accessors(qw(type));
8  
9 2 ▶use overload '""' => \&stringify;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 =head1 NAME
12  
13 Geo::OSM::MapFeatures::Feature::Type - Represents a feature type
14  
15 =head1 VERSION
16  
17 Version 0.01
18  
19 =cut
20  
21 2 our $VERSION = '0.01';
22  
23  
24 =head1 SYNOPSIS
25  
26 =head1 FUNCTIONS
27  
28 =head2 type
29  
30 Returns the type
31  
32 =cut
33  
34 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod documented
35 0 my $pkg = shift;
36 0 ▶ my $class = ref $pkg || $pkg;
Condition0%0/3
ref $pkg || $pkg
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $pkg || $pkg
ref $pkg $pkg
Truth table0%0/3
A || B
A= ref $pkgB= $pkg
ABresult
1X1
011
000
37 0 my $self = bless( {}, $class);
38  
39 0 $self->type( shift() );
40 #FIXME: throw if $type not in node, way, area
41  
42 0 return $self;
43 }
44  
45 0 ▶sub stringify {
Subroutine stringify: not called CC=1 SCAR=6.9
Pod undocumented
46 0 my $self = shift;
47  
48 0 return $self->type();
49 }
50  
51  
52 =head1 AUTHOR
53  
54 Knut Arne Bjørndal, C<< <bob at cakebox.net> >>
55  
56 =head1 BUGS
57  
58 Please report any bugs or feature requests to C<bug-geo-osm-mapfeatures-feature-type at rt.cpan.org>, or through
59 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geo-OSM-MapFeatures>. I will be notified, and then you'll
60 automatically be notified of progress on your bug as I make changes.
61  
62  
63  
64  
65 =head1 SUPPORT
66  
67 You can find documentation for this module with the perldoc command.
68  
69 perldoc Geo::OSM::MapFeatures
70  
71  
72 You can also look for information at:
73  
74 =over 4
75  
76 =item * RT: CPAN's request tracker
77  
78 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Geo-OSM-MapFeatures>
79  
80 =item * AnnoCPAN: Annotated CPAN documentation
81  
82 L<http://annocpan.org/dist/Geo-OSM-MapFeatures>
83  
84 =item * CPAN Ratings
85  
86 L<http://cpanratings.perl.org/d/Geo-OSM-MapFeatures>
87  
88 =item * Search CPAN
89  
90 L<http://search.cpan.org/dist/Geo-OSM-MapFeatures>
91  
92 =back
93  
94  
95 =head1 ACKNOWLEDGEMENTS
96  
97  
98 =head1 COPYRIGHT & LICENSE
99  
100 Copyright 2008 Knut Arne Bjørndal, all rights reserved.
101  
102 This program is free software; you can redistribute it and/or modify it
103 under the same terms as Perl itself.
104  
105  
106 =cut
107  
108 2 1; # End of Geo::OSM::MapFeatures::Feature::Type
« MapFeatures/Feature/Key.pm ↑ Summary MapFeatures/Feature/Value/List.pm »