API/Role/HavingGeneratedBy.pm

filter: Statementstmt 93.7% 15 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 90.4% 19 / 21 CC 1 SCAR 1.8
CC
1
Cov
94%
_build_last_generated
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« API/Role/Clonable.pm ↑ Summary API/Role/HavingFilename.pm »
1 package CPAN::Index::API::Role::HavingGeneratedBy;
2  
3 2 our $VERSION = '0.008';
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 has generated_by => (
11 is => 'ro',
12 isa => 'Str',
13 required => 1,
14 lazy_build => 1,
15 );
16  
17 2 has last_generated => (
18 is => 'ro',
19 isa => 'Str',
20 required => 1,
21 lazy_build => 1,
22 );
23  
24 2 ▶sub _build_generated_by {
Subroutine _build_generated_by: called CC=1 SCAR=0.0
25 2 my $package = blessed shift;
26 2 return $package . " " . $package->VERSION;
27 }
28  
29 0 ▶sub _build_last_generated {
Subroutine _build_last_generated: not called CC=1 SCAR=6.9
30 0 return scalar gmtime() . " GMT";
31 }
32  
33 2 1;
34  
35 =pod
36  
37 =encoding UTF-8
38  
39 =head1 NAME
40  
41 CPAN::Index::Role::HavingGeneratedBy - Provides 'generated_by' and 'last_generated' attributes
42  
43 =head1 PROVIDES
44  
45 =head2 generated_by
46  
47 Name of software that generated the file.
48  
49 =head2 last_generated
50  
51 Date and time when the file was last generated.
52  
53 =cut
« API/Role/Clonable.pm ↑ Summary API/Role/HavingFilename.pm »