| 1 | # | ||
| 2 | # This file is part of POE-Component-Client-MPD | ||
| 3 | # | ||
| 4 | # This software is copyright (c) 2007 by Jerome Quelin. | ||
| 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 | 23 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 23 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 23 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | package POE::Component::Client::MPD::Message; | ||
| 14 | # ABSTRACT: a message from POCOCM | ||
| 15 | 23 | $POE::Component::Client::MPD::Message::VERSION = '2.000'; | |
| 16 | 23 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 23 | ▶ | use MooseX::Has::Sugar; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 23 | ▶ | use MooseX::SemiAffordanceAccessor; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 23 | ▶ | use MooseX::Types::Moose qw{ ArrayRef Bool Str }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 23 | ▶ | use POE::Component::Client::MPD::Types; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | |||
| 23 | 23 | has request => ( ro, required, isa=>'Maybe[Str]' ); | |
| 24 | 23 | has params => ( ro, required, isa=>ArrayRef ); | |
| 25 | 23 | has status => ( rw, isa=>Bool ); | |
| 26 | |||
| 27 | 23 | has _data => ( rw ); | |
| 28 | 23 | has _commands => ( rw, isa=>ArrayRef ); | |
| 29 | 23 | has _cooking => ( rw, isa=>'Cooking' ); | |
| 30 | 23 | has _transform => ( rw, isa=>'Transform' ); | |
| 31 | 23 | has _post => ( rw, isa=>'Maybe[Str]' ); | |
| 32 | 23 | has _from => ( rw, isa=>Str ); | |
| 33 | |||
| 34 | 23 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 35 | 23 | __PACKAGE__->meta->make_immutable; | |
| 36 | 23 | 1; | |
| 37 | |||
| 38 | __END__ | ||
| 39 | |||
| 40 | =pod | ||
| 41 | |||
| 42 | =head1 NAME | ||
| 43 | |||
| 44 | POE::Component::Client::MPD::Message - a message from POCOCM | ||
| 45 | |||
| 46 | =head1 VERSION | ||
| 47 | |||
| 48 | version 2.000 | ||
| 49 | |||
| 50 | =head1 SYNOPSIS | ||
| 51 | |||
| 52 | print $msg->data . "\n"; | ||
| 53 | |||
| 54 | =head1 DESCRIPTION | ||
| 55 | |||
| 56 | L<POE::Component::Client::MPD::Message> is more a placeholder for a hash | ||
| 57 | ref with some pre-defined keys. | ||
| 58 | |||
| 59 | =head1 PUBLIC METHODS | ||
| 60 | |||
| 61 | This module has a C<new()> constructor, which should only be called by | ||
| 62 | one of the C<POCOCM>'s modules. | ||
| 63 | |||
| 64 | The other public methods are the following accessors: | ||
| 65 | |||
| 66 | =over 4 | ||
| 67 | |||
| 68 | =item * request() | ||
| 69 | |||
| 70 | The event sent to POCOCM. | ||
| 71 | |||
| 72 | =item * params() | ||
| 73 | |||
| 74 | The params of the event to POCOCM, as sent by client. | ||
| 75 | |||
| 76 | =item * status() | ||
| 77 | |||
| 78 | The status of the request. True for success, False in case of error. | ||
| 79 | |||
| 80 | =back | ||
| 81 | |||
| 82 | =head1 AUTHOR | ||
| 83 | |||
| 84 | Jerome Quelin | ||
| 85 | |||
| 86 | =head1 COPYRIGHT AND LICENSE | ||
| 87 | |||
| 88 | This software is copyright (c) 2007 by Jerome Quelin. | ||
| 89 | |||
| 90 | This is free software; you can redistribute it and/or modify it under | ||
| 91 | the same terms as the Perl 5 programming language system itself. | ||
| 92 | |||
| 93 | =cut | ||