Audio::MPD::Common::Types - types used in the distribution


Audio-MPD-Common documentation Contained in the Audio-MPD-Common distribution.

Index


Code Index:

NAME

Top

Audio::MPD::Common::Types - types used in the distribution

VERSION

Top

version 1.110550

DESCRIPTION

Top

This module implements the specific types used by the distribution, and exports them (exporting is done by Moose::Util::TypeConstraints).

Current types defined:

* State - a simple enumeration, allowing play, stop and pause.

It also defines a type coertion from Str to Audio::MPD::Common::Time.

AUTHOR

Top

  Jerome Quelin

COPYRIGHT AND LICENSE

Top


Audio-MPD-Common documentation Contained in the Audio-MPD-Common distribution.

#
# This file is part of Audio-MPD-Common
#
# This software is copyright (c) 2007 by Jerome Quelin.
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#
use 5.008;
use warnings;
use strict;

package Audio::MPD::Common::Types;
BEGIN {
  $Audio::MPD::Common::Types::VERSION = '1.110550';
}
# ABSTRACT: types used in the distribution

use Moose::Util::TypeConstraints;

use Audio::MPD::Common::Time;

enum 'State' => qw{ play stop pause };

coerce 'Audio::MPD::Common::Time'
    => from 'Str'
    => via { Audio::MPD::Common::Time->new(time=>$_) };

1;



__END__