Faker/Plugin/SoftwareVersion.pm untested

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