| 1 | =head1 NAME | ||
| 2 | |||
| 3 | Net::Songkick::Event - Models a metropolitan area in the Songkick API | ||
| 4 | |||
| 5 | =cut | ||
| 6 | |||
| 7 | package Net::Songkick::MetroArea; | ||
| 8 | |||
| 9 | 7 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 7 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 7 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 7 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 7 | ▶ | use Net::Songkick::Country; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | coerce 'Net::Songkick::MetroArea', | ||
| 18 | from 'HashRef', | ||
| 19 | 4 | ▶ | via { Net::Songkick::MetroArea->new($_) }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | |||
| 22 | has $_ => ( | ||
| 23 | is => 'ro', | ||
| 24 | isa => 'Str', | ||
| 25 | 7 | ) for qw[id displayName]; | |
| 26 | |||
| 27 | 7 | has 'country' => ( | |
| 28 | is => 'ro', | ||
| 29 | isa => 'Net::Songkick::Country', | ||
| 30 | coerce => 1, | ||
| 31 | ); | ||
| 32 | |||
| 33 | 7 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | 7 | __PACKAGE__->meta->make_immutable; | |
| 35 | |||
| 36 | =head1 AUTHOR | ||
| 37 | |||
| 38 | Dave Cross <dave@perlhacks.com> | ||
| 39 | |||
| 40 | =head1 SEE ALSO | ||
| 41 | |||
| 42 | perl(1), L<http://www.songkick.com/>, L<http://developer.songkick.com/> | ||
| 43 | |||
| 44 | =head1 COPYRIGHT AND LICENSE | ||
| 45 | |||
| 46 | Copyright (C) 2010, Magnum Solutions Ltd. All Rights Reserved. | ||
| 47 | |||
| 48 | This script is free software; you can redistribute it and/or modify it | ||
| 49 | under the same terms as Perl itself. | ||
| 50 | |||
| 51 | =cut | ||
| 52 | |||
| 53 | 7 | 1; | |