| 1 | 3 | ▶ | use v5.14.0; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | package OS::Package::Artifact; | ||
| 5 | |||
| 6 | # ABSTRACT: OS::Package::Artifact object. | ||
| 7 | 3 | our $VERSION = '0.2.6'; # VERSION | |
| 8 | |||
| 9 | 3 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 3 | ▶ | use Types::Standard qw( Str InstanceOf ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 3 | ▶ | use Path::Tiny; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 3 | with qw( | |
| 14 | OS::Package::Artifact::Role::Download | ||
| 15 | OS::Package::Artifact::Role::Extract | ||
| 16 | OS::Package::Artifact::Role::Validate | ||
| 17 | ); | ||
| 18 | |||
| 19 | 3 | my @string_methods = qw( distfile savefile url md5 sha1 ); | |
| 20 | |||
| 21 | 3 | has [@string_methods] => ( is => 'rw', isa => Str ); | |
| 22 | |||
| 23 | 3 | has repository => ( is => 'rw', isa => InstanceOf ['Path::Tiny'] ); | |
| 24 | |||
| 25 | 3 | has archive => ( is => 'rw', isa => InstanceOf ['Archive::Extract'] ); | |
| 26 | |||
| 27 | has workdir => ( | ||
| 28 | is => 'rw', | ||
| 29 | isa => InstanceOf ['Path::Tiny'], | ||
| 30 | required => 1, | ||
| 31 | 0 | ▶ | default => sub { return Path::Tiny->tempdir } |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 32 | 3 | ); | |
| 33 | |||
| 34 | 3 | 1; | |
| 35 | |||
| 36 | __END__ | ||
| 37 | |||
| 38 | =pod | ||
| 39 | |||
| 40 | =encoding UTF-8 | ||
| 41 | |||
| 42 | =head1 NAME | ||
| 43 | |||
| 44 | OS::Package::Artifact - OS::Package::Artifact object. | ||
| 45 | |||
| 46 | =head1 VERSION | ||
| 47 | |||
| 48 | version 0.2.6 | ||
| 49 | |||
| 50 | =head1 METHODS | ||
| 51 | |||
| 52 | =head2 url | ||
| 53 | |||
| 54 | The URL to download the application. | ||
| 55 | |||
| 56 | =head2 distfile | ||
| 57 | |||
| 58 | The name of the distribution file. | ||
| 59 | |||
| 60 | =head2 savefile | ||
| 61 | |||
| 62 | The location of the distribution file on local filesystem. | ||
| 63 | |||
| 64 | =head2 repository | ||
| 65 | |||
| 66 | Base directory to store artifacts. | ||
| 67 | |||
| 68 | =head2 archive | ||
| 69 | |||
| 70 | The Archive::Extract object of the extracted distfile. | ||
| 71 | |||
| 72 | =head2 workdir | ||
| 73 | |||
| 74 | Temporary directory to extract and stage artifact. | ||
| 75 | |||
| 76 | =head1 AUTHOR | ||
| 77 | |||
| 78 | James F Wilkus <jfwilkus@cpan.org> | ||
| 79 | |||
| 80 | =head1 COPYRIGHT AND LICENSE | ||
| 81 | |||
| 82 | This software is Copyright (c) 2014 by James F Wilkus. | ||
| 83 | |||
| 84 | This is free software, licensed under: | ||
| 85 | |||
| 86 | The (three-clause) BSD License | ||
| 87 | |||
| 88 | =cut | ||