| 1 | package CPAN::Index::API::Role::HavingGeneratedBy; | ||
| 2 | { | ||
| 3 | 5 | $CPAN::Index::API::Role::HavingGeneratedBy::VERSION = '0.007'; | |
| 4 | } | ||
| 5 | |||
| 6 | # ABSTRACT: Provides 'generated_by' and 'last_generated' attributes | ||
| 7 | |||
| 8 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 5 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 5 | has generated_by => ( | |
| 14 | is => 'ro', | ||
| 15 | isa => 'Str', | ||
| 16 | required => 1, | ||
| 17 | lazy_build => 1, | ||
| 18 | ); | ||
| 19 | |||
| 20 | 5 | has last_generated => ( | |
| 21 | is => 'ro', | ||
| 22 | isa => 'Str', | ||
| 23 | required => 1, | ||
| 24 | lazy_build => 1, | ||
| 25 | ); | ||
| 26 | |||
| 27 | sub _build_generated_by { | ||
| 28 | 2 | ▶ | my $package = blessed shift; |
|
Subroutine
_build_generated_by: called CC=1 SCAR=0.0
| |||
| 29 | 2 | return $package . " " . $package->VERSION; | |
| 30 | } | ||
| 31 | |||
| 32 | sub _build_last_generated { | ||
| 33 | 0 | ▶ | return scalar gmtime() . " GMT"; |
|
Subroutine
_build_last_generated: not called CC=1 SCAR=6.9
| |||
| 34 | } | ||
| 35 | |||
| 36 | 5 | 1; | |
| 37 | |||
| 38 | |||
| 39 | __END__ | ||
| 40 | =pod | ||
| 41 | |||
| 42 | =head1 NAME | ||
| 43 | |||
| 44 | CPAN::Index::API::Role::HavingGeneratedBy - Provides 'generated_by' and 'last_generated' attributes | ||
| 45 | |||
| 46 | =head1 VERSION | ||
| 47 | |||
| 48 | version 0.007 | ||
| 49 | |||
| 50 | =head1 PROVIDES | ||
| 51 | |||
| 52 | =head2 generated_by | ||
| 53 | |||
| 54 | Name of software that generated the file. | ||
| 55 | |||
| 56 | =head2 last_generated | ||
| 57 | |||
| 58 | Date and time when the file was last generated. | ||
| 59 | |||
| 60 | =head1 AUTHOR | ||
| 61 | |||
| 62 | Peter Shangov <pshangov@yahoo.com> | ||
| 63 | |||
| 64 | =head1 COPYRIGHT AND LICENSE | ||
| 65 | |||
| 66 | This software is copyright (c) 2012 by Venda, Inc.. | ||
| 67 | |||
| 68 | This is free software; you can redistribute it and/or modify it under | ||
| 69 | the same terms as the Perl 5 programming language system itself. | ||
| 70 | |||
| 71 | =cut | ||
| 72 | |||