| 1 | # | ||
| 2 | # This file is part of CPAN-WWW-Top100-Retrieve | ||
| 3 | # | ||
| 4 | # This software is copyright (c) 2014 by Apocalypse. | ||
| 5 | # | ||
| 6 | # This is free software; you can redistribute it and/or modify it under | ||
| 7 | # the same terms as the Perl 5 programming language system itself. | ||
| 8 | # | ||
| 9 | 2 | ▶ | use strict; use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | # Declare our package | ||
| 11 | package CPAN::WWW::Top100::Retrieve::Dist; | ||
| 12 | 2 | $CPAN::WWW::Top100::Retrieve::Dist::VERSION = '1.001'; | |
| 13 | 2 | our $AUTHORITY = 'cpan:APOCAL'; | |
| 14 | |||
| 15 | # ABSTRACT: Describes a dist in the Top100 | ||
| 16 | |||
| 17 | # import the Moose stuff | ||
| 18 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 2 | ▶ | use MooseX::StrictConstructor 0.08; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | 2 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | |||
| 22 | 2 | has 'type' => ( | |
| 23 | isa => 'Str', | ||
| 24 | is => 'ro', | ||
| 25 | required => 1, | ||
| 26 | ); | ||
| 27 | |||
| 28 | 2 | has 'dbid' => ( | |
| 29 | isa => 'Int', | ||
| 30 | is => 'ro', | ||
| 31 | required => 1, | ||
| 32 | ); | ||
| 33 | |||
| 34 | # Common to all types | ||
| 35 | 2 | has 'rank' => ( | |
| 36 | isa => 'Int', | ||
| 37 | is => 'ro', | ||
| 38 | required => 1, | ||
| 39 | ); | ||
| 40 | |||
| 41 | 2 | has 'author' => ( | |
| 42 | isa => 'Str', | ||
| 43 | is => 'ro', | ||
| 44 | required => 1, | ||
| 45 | ); | ||
| 46 | |||
| 47 | 2 | has 'dist' => ( | |
| 48 | isa => 'Str', | ||
| 49 | is => 'ro', | ||
| 50 | required => 1, | ||
| 51 | ); | ||
| 52 | |||
| 53 | 2 | has 'score' => ( | |
| 54 | isa => 'Int', | ||
| 55 | is => 'ro', | ||
| 56 | required => 1, | ||
| 57 | ); | ||
| 58 | |||
| 59 | # from Moose::Manual::BestPractices | ||
| 60 | 2 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 61 | 2 | __PACKAGE__->meta->make_immutable; | |
| 62 | |||
| 63 | 2 | 1; | |
| 64 | |||
| 65 | __END__ | ||