Faker/Plugin/InternetIpAddressV6.pm untested

filter: Statementstmt 0.0% 0 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod n/a totaltotal 0.0% 0 / 34 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::InternetIpAddressV6;
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 $faker = $self->faker;
30  
31 return join ':',
32 sprintf('%04s', sprintf("%02x", $faker->random_between(0, 65535))),
33 sprintf('%04s', sprintf("%02x", $faker->random_between(0, 65535))),
34 sprintf('%04s', sprintf("%02x", $faker->random_between(0, 65535))),
35 sprintf('%04s', sprintf("%02x", $faker->random_between(0, 65535))),
36 sprintf('%04s', sprintf("%02x", $faker->random_between(0, 65535))),
37 sprintf('%04s', sprintf("%02x", $faker->random_between(0, 65535))),
38 sprintf('%04s', sprintf("%02x", $faker->random_between(0, 65535))),
39 sprintf('%04s', sprintf("%02x", $faker->random_between(0, 65535)));
40 }
41  
42 1;
43  
44 =encoding utf8
45  
46 =head1 NAME
47  
48 Faker::Plugin::InternetIpAddressV6
49  
50 =cut
51  
52 =head1 ABSTRACT
53  
54 Internet Ip Address V6 Plugin for Faker
55  
56 =cut
57  
58 =head1 SYNOPSIS
59  
60 package main;
61  
62 use Faker;
63 use Faker::Plugin::InternetIpAddressV6;
64  
65 my $f = Faker->new;
66 my $p = Faker::Plugin::InternetIpAddressV6->new(faker => $f);
67  
68 my $plugin = $p;
69  
70 =cut
71  
72 =head1 DESCRIPTION
73  
74 This package provides methods for generating fake internet ip address v6 data.
75  
76 =cut
77  
78 =head1 INHERITS
79  
80 This package inherits behaviors from:
81  
82 L<Data::Object::Plugin>
83  
84 =cut
85  
86 =head1 LIBRARIES
87  
88 This package uses type constraints from:
89  
90 L<Types::Standard>
91  
92 =cut
93  
94 =head1 ATTRIBUTES
95  
96 This package has the following attributes:
97  
98 =cut
99  
100 =head2 faker
101  
102 faker(ConsumerOf["Faker::Maker"])
103  
104 This attribute is read-only, accepts C<(ConsumerOf["Faker::Maker"])> values, and is required.
105  
106 =cut
107  
108 =head1 METHODS
109  
110 This package implements the following methods:
111  
112 =cut
113  
114 =head2 execute
115  
116 execute() : Str
117  
118 The execute method returns a random fake internet ip address v6.
119  
120 =over 4
121  
122 =item execute example #1
123  
124 # given: synopsis
125  
126 $p->execute;
127  
128 =back
129  
130 =cut
131  
132 =head1 AUTHOR
133  
134 Al Newkirk, C<awncorp@cpan.org>
135  
136 =head1 LICENSE
137  
138 Copyright (C) 2011-2019, Al Newkirk, et al.
139  
140 This is free software; you can redistribute it and/or modify it under the terms
141 of the The Apache License, Version 2.0, as elucidated in the L<"license
142 file"|https://github.com/iamalnewkirk/faker/blob/master/LICENSE>.
143  
144 =head1 ACKNOWLEDGEMENTS
145  
146 Parts of this library were inspired by the following implementations:
147  
148 L<PHP Faker|https://github.com/fzaninotto/Faker>
149  
150 L<Ruby Faker|https://github.com/stympy/faker>
151  
152 L<Python Faker|https://github.com/joke2k/faker>
153  
154 L<JS Faker|https://github.com/Marak/faker.js>
155  
156 L<Elixir Faker|https://github.com/elixirs/faker>
157  
158 =head1 PROJECT
159  
160 L<Wiki|https://github.com/iamalnewkirk/faker/wiki>
161  
162 L<Project|https://github.com/iamalnewkirk/faker>
163  
164 L<Initiatives|https://github.com/iamalnewkirk/faker/projects>
165  
166 L<Milestones|https://github.com/iamalnewkirk/faker/milestones>
167  
168 L<Contributing|https://github.com/iamalnewkirk/faker/blob/master/CONTRIBUTE.md>
169  
170 L<Issues|https://github.com/iamalnewkirk/faker/issues>
171  
172 =cut