r48212 - in /branches/upstream/libaudio-mpd-common-perl/current: ./ lib/Audio/MPD/ lib/Audio/MPD/Common/ lib/Audio/MPD/Common/Item/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sat Dec 5 03:15:35 UTC 2009


Author: jawnsy-guest
Date: Sat Dec  5 03:15:30 2009
New Revision: 48212

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=48212
Log:
[svn-upgrade] Integrating new upstream version, libaudio-mpd-common-perl (1.093190)

Added:
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Types.pm
Modified:
    branches/upstream/libaudio-mpd-common-perl/current/Build.PL
    branches/upstream/libaudio-mpd-common-perl/current/Changes
    branches/upstream/libaudio-mpd-common-perl/current/MANIFEST
    branches/upstream/libaudio-mpd-common-perl/current/META.yml
    branches/upstream/libaudio-mpd-common-perl/current/Makefile.PL
    branches/upstream/libaudio-mpd-common-perl/current/README
    branches/upstream/libaudio-mpd-common-perl/current/dist.ini
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common.pm
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item.pm
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Directory.pm
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Playlist.pm
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Song.pm
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Stats.pm
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Status.pm
    branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Time.pm

Modified: branches/upstream/libaudio-mpd-common-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/Build.PL?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/Build.PL (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/Build.PL Sat Dec  5 03:15:30 2009
@@ -14,9 +14,12 @@
   ],
   requires      => {
     "base" => '0',
+    "MooseX::Has::Sugar" => '0',
+    "MooseX::Types::Moose" => '0',
     "English" => '0',
     "ExtUtils::MakeMaker" => '0',
     "overload" => '0',
+    "Sub::Exporter" => '0',
     "Moose::Util::TypeConstraints" => '0',
     "Readonly" => '0',
     "Test::More" => '0',

Modified: branches/upstream/libaudio-mpd-common-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/Changes?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/Changes (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/Changes Sat Dec  5 03:15:30 2009
@@ -1,6 +1,10 @@
 Revision history for Audio-MPD-Common
 
-1.093170  2009-11-13 16:38:18 UTC
+1.093190  2009-11-15 11:14:07 UTC
+ - isolating types in amc:types
+ - sweetening code with moosex::has::sugar
+
+1.093170 Fri Nov 13 17:38:35 2009
  - volume can be negative (in some error cases)
 
 1.093120 Sun Nov  8 15:15:58 2009

Modified: branches/upstream/libaudio-mpd-common-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/MANIFEST?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/MANIFEST (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/MANIFEST Sat Dec  5 03:15:30 2009
@@ -14,6 +14,7 @@
 lib/Audio/MPD/Common/Stats.pm
 lib/Audio/MPD/Common/Status.pm
 lib/Audio/MPD/Common/Time.pm
+lib/Audio/MPD/Common/Types.pm
 t/00-compile.t
 t/10-item.t
 t/11-time.t

Modified: branches/upstream/libaudio-mpd-common-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/META.yml?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/META.yml (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/META.yml Sat Dec  5 03:15:30 2009
@@ -11,34 +11,40 @@
 provides:
   Audio::MPD::Common:
     file: lib/Audio/MPD/Common.pm
-    version: 1.093170
+    version: 1.093190
   Audio::MPD::Common::Item:
     file: lib/Audio/MPD/Common/Item.pm
-    version: 1.093170
+    version: 1.093190
   Audio::MPD::Common::Item::Directory:
     file: lib/Audio/MPD/Common/Item/Directory.pm
-    version: 1.093170
+    version: 1.093190
   Audio::MPD::Common::Item::Playlist:
     file: lib/Audio/MPD/Common/Item/Playlist.pm
-    version: 1.093170
+    version: 1.093190
   Audio::MPD::Common::Item::Song:
     file: lib/Audio/MPD/Common/Item/Song.pm
-    version: 1.093170
+    version: 1.093190
   Audio::MPD::Common::Stats:
     file: lib/Audio/MPD/Common/Stats.pm
-    version: 1.093170
+    version: 1.093190
   Audio::MPD::Common::Status:
     file: lib/Audio/MPD/Common/Status.pm
-    version: 1.093170
+    version: 1.093190
   Audio::MPD::Common::Time:
     file: lib/Audio/MPD/Common/Time.pm
-    version: 1.093170
+    version: 1.093190
+  Audio::MPD::Common::Types:
+    file: lib/Audio/MPD/Common/Types.pm
+    version: 1.093190
 requires:
   English: 0
   File::Find: 0
   Moose: 0.92
   Moose::Util::TypeConstraints: 0
+  MooseX::Has::Sugar: 0
+  MooseX::Types::Moose: 0
   Readonly: 0
+  Sub::Exporter: 0
   Test::More: 0
   base: 0
   overload: 0
@@ -47,4 +53,4 @@
   MailingList: http://groups.google.com/group/audio-mpd
   homepage: http://search.cpan.org/dist/Audio-MPD-Common
   repository: http://github.com/jquelin/audio-mpd-common
-version: 1.093170
+version: 1.093190

Modified: branches/upstream/libaudio-mpd-common-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/Makefile.PL?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/Makefile.PL (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/Makefile.PL Sat Dec  5 03:15:30 2009
@@ -9,18 +9,21 @@
   NAME      => 'Audio::MPD::Common',
   AUTHOR    => "Jerome\ Quelin",
   ABSTRACT  => "common\ helper\ classes\ for\ mpd",
-  VERSION   => '1.093170',
+  VERSION   => '1.093190',
   EXE_FILES => [ qw() ],
   (eval { ExtUtils::MakeMaker->VERSION(6.31) } ? (LICENSE => 'perl') : ()),
   PREREQ_PM    => {
-    "perl" => '5.008',
-    "Test::More" => '0',
     "base" => '0',
+    "MooseX::Has::Sugar" => '0',
+    "MooseX::Types::Moose" => '0',
     "English" => '0',
-    "File::Find" => '0',
     "overload" => '0',
+    "Sub::Exporter" => '0',
     "Moose::Util::TypeConstraints" => '0',
     "Readonly" => '0',
+    "Test::More" => '0',
+    "perl" => '5.008',
+    "File::Find" => '0',
     "Moose" => '0.92',
   },
   test => {TESTS => 't/*.t'}

Modified: branches/upstream/libaudio-mpd-common-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/README?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/README (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/README Sat Dec  5 03:15:30 2009
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution Audio-MPD-Common, version
-1.093170:
+1.093190:
 
   common helper classes for mpd
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/dist.ini?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/dist.ini (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/dist.ini Sat Dec  5 03:15:30 2009
@@ -47,7 +47,7 @@
 [ExtraTests]
 [NextRelease]
 [PkgVersion]
-[PodPurler]
+[PodWeaver]
 [Prepender]
 copyright = 1
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common.pm?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common.pm (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common.pm Sat Dec  5 03:15:30 2009
@@ -11,7 +11,7 @@
 use warnings;
 
 package Audio::MPD::Common;
-our $VERSION = '1.093170';
+our $VERSION = '1.093190';
 
 
 # ABSTRACT: common helper classes for mpd
@@ -27,7 +27,7 @@
 
 =head1 VERSION
 
-version 1.093170
+version 1.093190
 
 =head1 DESCRIPTION
 
@@ -61,22 +61,42 @@
 
 =item * L<Audio::MPD::Common::Time>
 
+=item * L<Audio::MPD::Common::Types>
+
 =back
 
 Note that those modules should not be of any use outside the two mpd
 modules afore-mentioned.
 
-=head1 BUGS
-
-Please report any bugs or feature requests to C<bug-audio-mpd-common at
-rt.cpan.org>, or through the web interface at
-L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Audio-MPD-Common>.
-I will be notified, and then you'll automatically be notified of
-progress on your bug as I make changes.
-
 =head1 SEE ALSO
 
-You may want to see the modules really accessing MPD:
+You can look for information on this module at:
+
+=over 4
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/Audio-MPD-Common>
+
+=item * See open / report bugs
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Audio-MPD-Common>
+
+=item * Git repository
+
+L<http://github.com/jquelin/audio-mpd-common.git>
+
+=item * AnnoCPAN: Annotated CPAN documentation
+
+L<http://annocpan.org/dist/Audio-MPD-Common>
+
+=item * CPAN Ratings
+
+L<http://cpanratings.perl.org/d/Audio-MPD-Common>
+
+=back
+
+You may want to look at the modules really accessing MPD:
 
 =over 4
 
@@ -86,27 +106,9 @@
 
 =back
 
-You can also look for information on this module at:
-
-=over 4
-
-=item * AnnoCPAN: Annotated CPAN documentation
-
-L<http://annocpan.org/dist/Audio-MPD-Common>
-
-=item * CPAN Ratings
-
-L<http://cpanratings.perl.org/d/Audio-MPD-Common>
-
-=item * Open bugs
-
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Audio-MPD-Common>
-
-=back
-
 =head1 AUTHOR
 
-Jerome Quelin
+  Jerome Quelin
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item.pm?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item.pm (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item.pm Sat Dec  5 03:15:30 2009
@@ -11,7 +11,7 @@
 use warnings;
 
 package Audio::MPD::Common::Item;
-our $VERSION = '1.093170';
+our $VERSION = '1.093190';
 
 
 # ABSTRACT: a generic collection item
@@ -47,20 +47,7 @@
 
 =head1 VERSION
 
-version 1.093170
-
-=head1 METHODS
-
-=head2 my $item = Audio::MPD::Common::Item->new( %params );
-
-Create and return either an L<Audio::MPD::Common::Item::Song>, an
-L<Audio::MPD::Common::Item::Directory> or an L<Audio::MPD::Common::Playlist>
-object, depending on the existence of a key C<file>, C<directory> or
-C<playlist> (respectively).
-
-=cut
-
-=pod
+version 1.093190
 
 =head1 SYNOPSIS
 
@@ -76,9 +63,18 @@
 or an L<Audio::MPD::Common::Playlist> object. Currently, the
 discrimination is done on the existence of the C<file> key of C<%params>.
 
+=head1 METHODS
+
+=head2 my $item = Audio::MPD::Common::Item->new( %params );
+
+Create and return either an L<Audio::MPD::Common::Item::Song>, an
+L<Audio::MPD::Common::Item::Directory> or an L<Audio::MPD::Common::Playlist>
+object, depending on the existence of a key C<file>, C<directory> or
+C<playlist> (respectively).
+
 =head1 AUTHOR
 
-Jerome Quelin
+  Jerome Quelin
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Directory.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Directory.pm?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Directory.pm (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Directory.pm Sat Dec  5 03:15:30 2009
@@ -11,12 +11,14 @@
 use warnings;
 
 package Audio::MPD::Common::Item::Directory;
-our $VERSION = '1.093170';
+our $VERSION = '1.093190';
 
 
 # ABSTRACT: a directory object
 
 use Moose;
+use MooseX::Has::Sugar;
+use MooseX::Types::Moose qw{ Str };
 
 use base qw{ Audio::MPD::Common::Item };
 
@@ -24,7 +26,7 @@
 # -- public attributes
 
 
-has directory => ( is=>'rw', isa=>'Str', required=>1 );
+has directory => ( rw, isa=>Str, required );
 
 1;
 
@@ -37,17 +39,7 @@
 
 =head1 VERSION
 
-version 1.093170
-
-=head1 ATTRIBUTES
-
-=head2 $item->directory;
-
-The path to the item's directory.
-
-=cut
-
-=pod
+version 1.093190
 
 =head1 DESCRIPTION
 
@@ -57,9 +49,15 @@
 The constructor should only be called by L<Audio::MPD::Common::Item>'s
 constructor.
 
+=head1 ATTRIBUTES
+
+=head2 $item->directory;
+
+The path to the item's directory.
+
 =head1 AUTHOR
 
-Jerome Quelin
+  Jerome Quelin
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Playlist.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Playlist.pm?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Playlist.pm (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Playlist.pm Sat Dec  5 03:15:30 2009
@@ -11,12 +11,14 @@
 use warnings;
 
 package Audio::MPD::Common::Item::Playlist;
-our $VERSION = '1.093170';
+our $VERSION = '1.093190';
 
 
 # ABSTRACT: a playlist object
 
 use Moose;
+use MooseX::Has::Sugar;
+use MooseX::Types::Moose qw{ Str };
 
 use base qw{ Audio::MPD::Common::Item };
 
@@ -24,8 +26,8 @@
 # -- public attributes
 
 
-has last_modified => ( is=>'rw', isa=>'Str', required=>0 );
-has playlist      => ( is=>'rw', isa=>'Str', required=>1 );
+has last_modified => ( rw, isa=>Str );
+has playlist      => ( rw, isa=>Str, required );
 
 1;
 
@@ -38,7 +40,15 @@
 
 =head1 VERSION
 
-version 1.093170
+version 1.093190
+
+=head1 DESCRIPTION
+
+L<Audio::MPD::Common::Item::Playlist> is more a placeholder with some
+attributes.
+
+The constructor should only be called by L<Audio::MPD::Common::Item>'s
+constructor.
 
 =head1 ATTRIBUTES
 
@@ -50,21 +60,9 @@
 
 Path to the playlist file.
 
-=cut
-
-=pod
-
-=head1 DESCRIPTION
-
-L<Audio::MPD::Common::Item::Playlist> is more a placeholder with some
-attributes.
-
-The constructor should only be called by L<Audio::MPD::Common::Item>'s
-constructor.
-
 =head1 AUTHOR
 
-Jerome Quelin
+  Jerome Quelin
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Song.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Song.pm?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Song.pm (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Item/Song.pm Sat Dec  5 03:15:30 2009
@@ -11,12 +11,14 @@
 use warnings;
 
 package Audio::MPD::Common::Item::Song;
-our $VERSION = '1.093170';
+our $VERSION = '1.093190';
 
 
 # ABSTRACT: a song object with some audio tags
 
 use Moose;
+use MooseX::Has::Sugar;
+use MooseX::Types::Moose qw{ Int Str };
 use Readonly;
 
 use base qw{ Audio::MPD::Common::Item };
@@ -28,18 +30,18 @@
 # -- public attributes
 
 
-has album  => ( is=>'rw', isa=>'Str' );
-has artist => ( is=>'rw', isa=>'Str' );
-has date   => ( is=>'rw', isa=>'Str' );
-has disc   => ( is=>'rw', isa=>'Str' );
-has file   => ( is=>'rw', isa=>'Str', required=>1 );
-has genre  => ( is=>'rw', isa=>'Str' );
-has id     => ( is=>'rw', isa=>'Int' );
-has name   => ( is=>'rw', isa=>'Str' );
-has pos    => ( is=>'rw', isa=>'Int' );
-has title  => ( is=>'rw', isa=>'Str' );
-has track  => ( is=>'rw', isa=>'Str' );
-has time   => ( is=>'rw', isa=>'Int' );
+has album  => ( rw, isa=>Str );
+has artist => ( rw, isa=>Str );
+has date   => ( rw, isa=>Str );
+has disc   => ( rw, isa=>Str );
+has file   => ( rw, isa=>Str, required );
+has genre  => ( rw, isa=>Str );
+has id     => ( rw, isa=>Int );
+has name   => ( rw, isa=>Str );
+has pos    => ( rw, isa=>Int );
+has title  => ( rw, isa=>Str );
+has track  => ( rw, isa=>Str );
+has time   => ( rw, isa=>Int );
 
 
 # -- public methods
@@ -70,7 +72,16 @@
 
 =head1 VERSION
 
-version 1.093170
+version 1.093190
+
+=head1 DESCRIPTION
+
+L<Audio::MPD::Common::Item::Song> is more a placeholder with some
+attributes. Those attributes are taken from the song tags, so some of
+them can be empty depending on the file.
+
+The constructor should only be called by L<Audio::MPD::Common::Item>'s
+constructor.
 
 =head1 ATTRIBUTES
 
@@ -122,10 +133,6 @@
 
 Length of the song in seconds.
 
-=cut
-
-=pod
-
 =head1 METHODS
 
 =head2 my $str = $song->as_string;
@@ -149,22 +156,9 @@
 
 This method is also used to automatically stringify the C<$song>.
 
-=cut
-
-=pod
-
-=head1 DESCRIPTION
-
-L<Audio::MPD::Common::Item::Song> is more a placeholder with some
-attributes. Those attributes are taken from the song tags, so some of
-them can be empty depending on the file.
-
-The constructor should only be called by L<Audio::MPD::Common::Item>'s
-constructor.
-
 =head1 AUTHOR
 
-Jerome Quelin
+  Jerome Quelin
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Stats.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Stats.pm?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Stats.pm (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Stats.pm Sat Dec  5 03:15:30 2009
@@ -11,24 +11,26 @@
 use warnings;
 
 package Audio::MPD::Common::Stats;
-our $VERSION = '1.093170';
+our $VERSION = '1.093190';
 
 
 # ABSTRACT: class representing MPD stats
 
 use Moose;
+use MooseX::Has::Sugar;
+use MooseX::Types::Moose qw{ Int };
 
 
 # -- public attributes
 
 
-has artists     => ( is=>'ro', isa=>'Int', required=>1 );
-has albums      => ( is=>'ro', isa=>'Int', required=>1 );
-has songs       => ( is=>'ro', isa=>'Int', required=>1 );
-has uptime      => ( is=>'ro', isa=>'Int', required=>1 );
-has playtime    => ( is=>'ro', isa=>'Int', required=>1 );
-has db_playtime => ( is=>'ro', isa=>'Int', required=>1 );
-has db_update   => ( is=>'ro', isa=>'Int', required=>1 );
+has artists     => ( ro, isa=>Int, required );
+has albums      => ( ro, isa=>Int, required );
+has songs       => ( ro, isa=>Int, required );
+has uptime      => ( ro, isa=>Int, required );
+has playtime    => ( ro, isa=>Int, required );
+has db_playtime => ( ro, isa=>Int, required );
+has db_update   => ( ro, isa=>Int, required );
 
 
 1;
@@ -42,7 +44,19 @@
 
 =head1 VERSION
 
-version 1.093170
+version 1.093190
+
+=head1 DESCRIPTION
+
+The MPD server maintains some general information. Those information can
+be queried with the mpd modules. Some of those information are served to
+you as an L<Audio::MPD::Common::Status> object.
+
+An L<Audio::MPD::Common::Stats> object does B<not> update itself
+regularly, and thus should be used immediately.
+
+Note: one should B<never> ever instantiate an L<Audio::MPD::Common::Stats>
+object directly - use the mpd modules instead.
 
 =head1 ATTRIBUTES
 
@@ -74,25 +88,9 @@
 
 Last database update in UNIX time.
 
-=cut
-
-=pod
-
-=head1 DESCRIPTION
-
-The MPD server maintains some general information. Those information can
-be queried with the mpd modules. Some of those information are served to
-you as an L<Audio::MPD::Common::Status> object.
-
-An L<Audio::MPD::Common::Stats> object does B<not> update itself
-regularly, and thus should be used immediately.
-
-Note: one should B<never> ever instantiate an L<Audio::MPD::Common::Stats>
-object directly - use the mpd modules instead.
-
 =head1 AUTHOR
 
-Jerome Quelin
+  Jerome Quelin
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Status.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Status.pm?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Status.pm (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Status.pm Sat Dec  5 03:15:30 2009
@@ -11,41 +11,36 @@
 use warnings;
 
 package Audio::MPD::Common::Status;
-our $VERSION = '1.093170';
+our $VERSION = '1.093190';
 
 
 # ABSTRACT: class representing MPD status
 
 use Moose;
-use Moose::Util::TypeConstraints;
+use MooseX::Has::Sugar;
+use MooseX::Types::Moose qw{ Bool Int Str };
+
 use Audio::MPD::Common::Time;
-
-
-# -- private types
-
-enum 'State' => qw{ play stop pause };
-coerce 'Audio::MPD::Common::Time'
-    => from 'Str'
-    => via { Audio::MPD::Common::Time->new(time=>$_) };
+use Audio::MPD::Common::Types;
 
 
 # -- public attributes
 
 
-has audio          => ( is=>'ro', isa=>'Str' );
-has bitrate        => ( is=>'ro', isa=>'Int' );
-has error          => ( is=>'ro', isa=>'Str' );
-has playlist       => ( is=>'ro', isa=>'Int' );
-has playlistlength => ( is=>'ro', isa=>'Int' );
-has random         => ( is=>'ro', isa=>'Bool' );
-has repeat         => ( is=>'ro', isa=>'Bool' );
-has songid         => ( is=>'ro', isa=>'Int' );
-has song           => ( is=>'ro', isa=>'Int' );
-has state          => ( is=>'ro', isa=>'State' );
-has time           => ( is=>'ro', isa=>'Audio::MPD::Common::Time', coerce=>1 );
-has updating_db    => ( is=>'ro', isa=>'Int' );
-has volume         => ( is=>'ro', isa=>'Int' );
-has xfade          => ( is=>'ro', isa=>'Int' );
+has audio          => ( ro, isa=>Str  );
+has bitrate        => ( ro, isa=>Int  );
+has error          => ( ro, isa=>Str  );
+has playlist       => ( ro, isa=>Int  );
+has playlistlength => ( ro, isa=>Int  );
+has random         => ( ro, isa=>Bool );
+has repeat         => ( ro, isa=>Bool );
+has songid         => ( ro, isa=>Int  );
+has song           => ( ro, isa=>Int  );
+has state          => ( ro, isa=>'State' );
+has time           => ( ro, isa=>'Audio::MPD::Common::Time', coerce );
+has updating_db    => ( ro, isa=>Int  );
+has volume         => ( ro, isa=>Int  );
+has xfade          => ( ro, isa=>Int  );
 
 
 1;
@@ -59,7 +54,19 @@
 
 =head1 VERSION
 
-version 1.093170
+version 1.093190
+
+=head1 DESCRIPTION
+
+The MPD server maintains some information on its current state. Those
+information can be queried with mpd modules. Some of those information
+are served to you as an L<Audio::MPD::Common::Status> object.
+
+An L<Audio::MPD::Common::Status> object does B<not> update itself
+regularly, and thus should be used immediately.
+
+Note: one should B<never> ever instantiate an L<Audio::MPD::Common::Status>
+object directly - use the mpd modules instead.
 
 =head1 ATTRIBUTES
 
@@ -123,25 +130,9 @@
 
 The crossfade in seconds.
 
-=cut
-
-=pod
-
-=head1 DESCRIPTION
-
-The MPD server maintains some information on its current state. Those
-information can be queried with mpd modules. Some of those information
-are served to you as an L<Audio::MPD::Common::Status> object.
-
-An L<Audio::MPD::Common::Status> object does B<not> update itself
-regularly, and thus should be used immediately.
-
-Note: one should B<never> ever instantiate an L<Audio::MPD::Common::Status>
-object directly - use the mpd modules instead.
-
 =head1 AUTHOR
 
-Jerome Quelin
+  Jerome Quelin
 
 =head1 COPYRIGHT AND LICENSE
 

Modified: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Time.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Time.pm?rev=48212&op=diff
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Time.pm (original)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Time.pm Sat Dec  5 03:15:30 2009
@@ -11,7 +11,7 @@
 use warnings;
 
 package Audio::MPD::Common::Time;
-our $VERSION = '1.093170';
+our $VERSION = '1.093190';
 
 
 # ABSTRACT: class representing time of current song
@@ -110,77 +110,7 @@
 
 =head1 VERSION
 
-version 1.093170
-
-=head1 ATTRIBUTES
-
-=head2 $time->time;
-
-The time passed to the constructor, used to compute all others values
-(see methods). It is the time value (on the "time" line) of what the MPD
-server returns to the status command. Defaults to C<0:0>.
-
-=cut
-
-=pod
-
-=head1 METHODS
-
-=head2 my $str = $time->sofar;
-
-Return elapsed C<$time> (C<minutes:seconds> format).
-
-=head2 my $str = $time->left;
-
-Return remaining C<$time> (C<minutes:seconds> format).
-
-=head2 my $str = $time->left;
-
-Return total C<$time> (C<minutes:seconds> format).
-
-=head2 my $percent = $time->percent;
-
-Return elapsed C<$time> (percentage, 1 digit).
-
-=head2 my $secs = $time->seconds_sofar;
-
-Return elapsed C<$time> in seconds.
-
-=head2 my $secs = $time->seconds_left;
-
-Return remaining C<$time> in seconds.
-
-=head2 my $secs = $time->seconds_total;
-
-Return total C<$time> in seconds.
-
-=head2 my $mins = $time->sofar_mins;
-
-Return minutes part of elapsed C<$time>.
-
-=head2 my $secs = $time->sofar_secs;
-
-Return seconds part of elapsed C<$time>.
-
-=head2 my $mins = $time->left_mins;
-
-Return minutes part of remaining C<$time>.
-
-=head2 my $secs = $time->left_secs;
-
-Return seconds part of remaining C<$time>.
-
-=head2 my $mins = $time->total_mins;
-
-Return minutes part of total C<$time>.
-
-=head2 my $mins = $time->total_secs;
-
-Return seconds part of total C<$time>.
-
-=cut
-
-=pod
+version 1.093190
 
 =head1 DESCRIPTION
 
@@ -195,9 +125,71 @@
 Note: one should B<never> ever instantiate an L<Audio::MPD::Common::Time>
 object directly - use the mpd modules instead.
 
+=head1 ATTRIBUTES
+
+=head2 $time->time;
+
+The time passed to the constructor, used to compute all others values
+(see methods). It is the time value (on the "time" line) of what the MPD
+server returns to the status command. Defaults to C<0:0>.
+
+=head1 METHODS
+
+=head2 my $str = $time->sofar;
+
+Return elapsed C<$time> (C<minutes:seconds> format).
+
+=head2 my $str = $time->left;
+
+Return remaining C<$time> (C<minutes:seconds> format).
+
+=head2 my $str = $time->left;
+
+Return total C<$time> (C<minutes:seconds> format).
+
+=head2 my $percent = $time->percent;
+
+Return elapsed C<$time> (percentage, 1 digit).
+
+=head2 my $secs = $time->seconds_sofar;
+
+Return elapsed C<$time> in seconds.
+
+=head2 my $secs = $time->seconds_left;
+
+Return remaining C<$time> in seconds.
+
+=head2 my $secs = $time->seconds_total;
+
+Return total C<$time> in seconds.
+
+=head2 my $mins = $time->sofar_mins;
+
+Return minutes part of elapsed C<$time>.
+
+=head2 my $secs = $time->sofar_secs;
+
+Return seconds part of elapsed C<$time>.
+
+=head2 my $mins = $time->left_mins;
+
+Return minutes part of remaining C<$time>.
+
+=head2 my $secs = $time->left_secs;
+
+Return seconds part of remaining C<$time>.
+
+=head2 my $mins = $time->total_mins;
+
+Return minutes part of total C<$time>.
+
+=head2 my $mins = $time->total_secs;
+
+Return seconds part of total C<$time>.
+
 =head1 AUTHOR
 
-Jerome Quelin
+  Jerome Quelin
 
 =head1 COPYRIGHT AND LICENSE
 

Added: branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Types.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Types.pm?rev=48212&op=file
==============================================================================
--- branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Types.pm (added)
+++ branches/upstream/libaudio-mpd-common-perl/current/lib/Audio/MPD/Common/Types.pm Sat Dec  5 03:15:30 2009
@@ -1,0 +1,76 @@
+# 
+# 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;
+our $VERSION = '1.093190';
+
+
+# ABSTRACT: types used in the distribution
+
+use Moose::Util::TypeConstraints;
+use Sub::Exporter;
+use Sub::Exporter -setup => { exports => [ qw{ State } ] };
+
+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;
+
+
+=pod
+
+=head1 NAME
+
+Audio::MPD::Common::Types - types used in the distribution
+
+=head1 VERSION
+
+version 1.093190
+
+=head1 DESCRIPTION
+
+This module implements the specific types used by the distribution, and
+exports them. It is using L<Sub::Exporter> underneath, so you can use
+all the shenanigans to change the export names.
+
+Current types defined and exported:
+
+=over 4
+
+=item * State - a simple enumeration, allowing C<play>, C<stop>
+and C<pause>.
+
+=back
+
+It also defines a type coertion from C<Str> to C<Audio::MPD::Common::Time>.
+
+=head1 AUTHOR
+
+  Jerome Quelin
+
+=head1 COPYRIGHT AND LICENSE
+
+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.
+
+=cut
+
+
+__END__




More information about the Pkg-perl-cvs-commits mailing list