Plugin/Code/VersionProvider.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 1 totaltotal 97.3% 36 / 37 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Plugin/Code/TestRunner.pm ↑ Summary PluginBundle/Code.pm »
1 # vim: ts=4 sts=4 sw=4 et: syntax=perl
2 #
3 # Copyright (c) 2020-2023 Sven Kirmess
4 #
5 # Permission to use, copy, modify, and distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  
17 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 package Dist::Zilla::Plugin::Code::VersionProvider;
22  
23 2 our $VERSION = '0.008';
24  
25 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 2 with 'Dist::Zilla::Role::VersionProvider';
29  
30 2 ▶use Config::MVP 2.200012 (); # https://github.com/rjbs/Config-MVP/issues/13
Subroutine BEGIN: called CC=1 SCAR=0.0
31 2 ▶use MooseX::Types::Moose qw(CodeRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 2 has provide_version => (
34 is => 'ro',
35 isa => 'CodeRef',
36 reader => '_provide_version',
37 required => 1,
38 );
39  
40 2 ▶sub provide_version {
Subroutine provide_version: called CC=1 SCAR=0.0
Pod undocumented
41 2 my $self = shift;
42  
43 2 my $code_ref = $self->_provide_version;
44 2 return $self->$code_ref(@_);
45 }
46  
47 2 __PACKAGE__->meta->make_immutable;
48  
49 2 1;
50  
51 __END__
« Plugin/Code/TestRunner.pm ↑ Summary PluginBundle/Code.pm »