Faker/Plugin/AddressLatitude.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod n/a totaltotal 0.0% 0 / 36 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Faker::Plugin::AddressLatitude;
2  
3 use 5.014;
4  
5 use strict;
6 use warnings;
7  
8 use registry;
9 use routines;
10  
11 use Data::Object::Class;
12 use Data::Object::ClassHas;
13  
14 extends 'Data::Object::Plugin';
15  
16 our $VERSION = '1.03'; # VERSION
17  
18 # ATTRIBUTES
19  
20 has 'faker' => (
21 is => 'ro',
22 isa => 'ConsumerOf["Faker::Maker"]',
23 req => 1,
24 );
25  
26 # METHODS
27  
28 method execute() {
29 my $string = (int(rand(90000000)), int(rand(-90000000)))[rand 2];
30  
31 $string =~ s/\d*(\d\d)(\d{6})$/$1.$2/;
32  
33 return $string;
34 }
35  
36 1;
37  
38 =encoding utf8
39  
40 =head1 NAME
41  
42 Faker::Plugin::AddressLatitude
43  
44 =cut
45  
46 =head1 ABSTRACT
47  
48 Address Latitude Plugin for Faker
49  
50 =cut
51  
52 =head1 SYNOPSIS
53  
54 package main;
55  
56 use Faker;
57 use Faker::Plugin::AddressLatitude;
58  
59 my $f = Faker->new;
60 my $p = Faker::Plugin::AddressLatitude->new(faker => $f);
61  
62 my $plugin = $p;
63  
64 =cut
65  
66 =head1 DESCRIPTION
67  
68 This package provides methods for generating fake address latitude data.
69  
70 =cut
71  
72 =head1 INHERITS
73  
74 This package inherits behaviors from:
75  
76 L<Data::Object::Plugin>
77  
78 =cut
79  
80 =head1 LIBRARIES
81  
82 This package uses type constraints from:
83  
84 L<Types::Standard>
85  
86 =cut
87  
88 =head1 ATTRIBUTES
89  
90 This package has the following attributes:
91  
92 =cut
93  
94 =head2 faker
95  
96 faker(ConsumerOf["Faker::Maker"])
97  
98 This attribute is read-only, accepts C<(ConsumerOf["Faker::Maker"])> values, and is required.
99  
100 =cut
101  
102 =head1 METHODS
103  
104 This package implements the following methods:
105  
106 =cut
107  
108 =head2 execute
109  
110 execute() : Str
111  
112 The execute method returns a random fake address latitude.
113  
114 =over 4
115  
116 =item execute example #1
117  
118 # given: synopsis
119  
120 $p->execute;
121  
122 =back
123  
124 =cut
125  
126 =head1 AUTHOR
127  
128 Al Newkirk, C<awncorp@cpan.org>
129  
130 =head1 LICENSE
131  
132 Copyright (C) 2011-2019, Al Newkirk, et al.
133  
134 This is free software; you can redistribute it and/or modify it under the terms
135 of the The Apache License, Version 2.0, as elucidated in the L<"license
136 file"|https://github.com/iamalnewkirk/faker/blob/master/LICENSE>.
137  
138 =head1 ACKNOWLEDGEMENTS
139  
140 Parts of this library were inspired by the following implementations:
141  
142 L<PHP Faker|https://github.com/fzaninotto/Faker>
143  
144 L<Ruby Faker|https://github.com/stympy/faker>
145  
146 L<Python Faker|https://github.com/joke2k/faker>
147  
148 L<JS Faker|https://github.com/Marak/faker.js>
149  
150 L<Elixir Faker|https://github.com/elixirs/faker>
151  
152 =head1 PROJECT
153  
154 L<Wiki|https://github.com/iamalnewkirk/faker/wiki>
155  
156 L<Project|https://github.com/iamalnewkirk/faker>
157  
158 L<Initiatives|https://github.com/iamalnewkirk/faker/projects>
159  
160 L<Milestones|https://github.com/iamalnewkirk/faker/milestones>
161  
162 L<Contributing|https://github.com/iamalnewkirk/faker/blob/master/CONTRIBUTE.md>
163  
164 L<Issues|https://github.com/iamalnewkirk/faker/issues>
165  
166 =cut