MapFeatures/Feature/Value/Range.pm

filter: Statementstmt 62.5% 15 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 2 totaltotal 59.3% 19 / 32 CC 1 SCAR 2.9
CC
1
Cov
62%
init
2.0
stringify
2.0
BEGIN
1.0
CRAP 1.3
« MapFeatures/Feature/Value/NumWithUnit.pm ↑ Summary MapFeatures/Feature/Value/Date.pm »
1 package Geo::OSM::MapFeatures::Feature::Value::Range;
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(Geo::OSM::MapFeatures::Feature::Value);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use overload '""' => \&stringify;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 Geo::OSM::MapFeatures::Feature::Value::Range - Numeric range value type
13  
14 =head1 VERSION
15  
16 Version 0.01
17  
18 =cut
19  
20 2 our $VERSION = '0.01';
21  
22  
23 =head1 SYNOPSIS
24  
25 =head1 FUNCTIONS
26  
27 =head2 from
28  
29 =head2 to
30  
31 =cut
32  
33 2 __PACKAGE__->mk_accessors(qw(from to));
34  
35 0 ▶sub init {
Subroutine init: not called CC=1 SCAR=6.9
Pod undocumented
36 0 my $self = shift;
37 0 my $value = shift;
38 0 my %classargs = %{ shift() };
39  
40 0 $self->from($classargs{from});
41 0 $self->to($classargs{to});
42  
43 0 return $self;
44 }
45  
46 0 ▶sub stringify {
Subroutine stringify: not called CC=1 SCAR=6.9
Pod undocumented
47 0 my $self = shift;
48  
49 0 return sprintf("Range: %s - %s", $self->from, $self->to);
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-value-range 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::Value::Range
« MapFeatures/Feature/Value/NumWithUnit.pm ↑ Summary MapFeatures/Feature/Value/Date.pm »