Audio-MPD-Common-1.120881000755000764000144 011734632062 14662 5ustar00jquelinusers000000000000README100644000764000144 45711734632062 15611 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881 This archive contains the distribution Audio-MPD-Common, version 1.120881: common helper classes for mpd 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. Changes100644000764000144 362311734632062 16242 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881Revision history for Audio-MPD-Common 1.120881 2012-03-28 17:54:21 Europe/Paris - new amci:song attributes: composer, performer - amci:song attribute album_artist renamed to albumartist 1.120880 2012-03-28 10:57:23 Europe/Paris - new amci:song attribute: album_artist (rt#76057) - allow a format to control as_string in amci:song 1.120610 2012-03-01 09:36:00 Europe/Paris - new amci:song attribute: last_modified 1.110550 2011-02-24 16:05:29 Europe/Paris - new object: amc::output 1.100430 2010-02-12 12:55:26 Europe/Paris - WARNING: no more makefile.pl supplied, only a build.pl - sub::exporter no more used internally 1.093190 Sun Nov 15 12:14:23 2009 - 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 - date should be a string, not an int 1.092910 Sun Oct 18 11:55:22 2009 - requiring perl 5.008 1.092900 Sat Oct 17 19:28:11 2009 - new amci:song accessor: disc 1.092860 Tue Oct 13 17:33:42 2009 - track attribute in amci:song can be a string - bumping requirement of moose to 0.92 to get hash traits 1.092840 Sun Oct 11 09:31:23 2009 - amci:* accessors should not be readonly (assigned one by one by pococm:conn) 1.092830 Sat Oct 10 18:52:59 2009 - migrated to moose - warning: accessors are now read-only! - new song accessor: name (bug reported by thorsten schwinn) - migrated to dist::zilla (raaaaaar!) ** 0.1.4 Tue Jan 6 16:40:08 CET 2009 - missing tag last_modified in amci:playlist (new in mpd 0.14) 0.1.3 Tue Sep 23 08:35:42 CEST 2008 - [rt#39529] missing tag fields in amci:song 0.1.2 Mon Nov 26 12:55:46 CET 2007 - kwalitee/cpants release 0.1.1 Thu May 31 20:42:52 CEST 2007 - new accessor for Status: updating_db (bug mantis #546) 0.1.0 Wed May 30 17:39:00 CEST 2007 - first version based on poe::component::client::mpd - heavy cleanup LICENSE100644000764000144 4365611734632062 16006 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881This 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. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2007 by Jerome Quelin. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2007 by Jerome Quelin. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist.ini100644000764000144 36011734632062 16366 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881name = Audio-MPD-Common author = Jerome Quelin license = Perl_5 copyright_holder = Jerome Quelin copyright_year = 2007 ; -- static meta-information [MetaResources] x_MailingList = http://groups.google.com/group/audio-mpd [@JQUELIN] t000755000764000144 011734632062 15046 5ustar00jquelinusers000000000000Audio-MPD-Common-1.120881item.t100644000764000144 637211734632062 16341 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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 strict; use warnings; use Audio::MPD::Common::Item; use Test::More tests => 25; my ($i, $output, @output, %params); # # testing amc::item::song $output = 'file: some/random/path/to/a/song.ogg Time: 234 Name: friskyRadio | feelin frisky? Artist: Foo Bar Album: Frobnizer Track: 26 Title: Blah! Disc: 1/2 Pos: 10 Id: 14 '; @output = split /\n/, $output; %params = map { /^([^:]+):\s+(.*)$/ ? ($1=>$2) : () } @output; $i = Audio::MPD::Common::Item->new( %params ); isa_ok( $i, 'Audio::MPD::Common::Item::Song', 'song creation' ); is( $i->file, 'some/random/path/to/a/song.ogg', 'accessor: file' ); is( $i->time, 234, 'accessor: time' ); is( $i->artist, 'Foo Bar', 'accessor: artist' ); is( $i->album, 'Frobnizer', 'accessor: album' ); is( $i->disc, '1/2', 'accessor: disc' ); is( $i->track, 26, 'accessor: track' ); is( $i->title, 'Blah!', 'accessor: title' ); is( $i->pos, 10, 'accessor: pos' ); is( $i->name, 'friskyRadio | feelin frisky?', 'accessor: name' ); is( $i->id, 14, 'accessor: id' ); isa_ok( $i, 'Audio::MPD::Common::Item', 'song inherits from item' ); # # testing as_string from amc::item::song. is( $i->as_string("%t (%l)"), "Blah! (234)", "as_string with a format" ); is( $i->as_string, 'Frobnizer = 26 = Foo Bar = Blah!', 'as_string() with all tags' ); delete $params{Track}; $i = Audio::MPD::Common::Item->new( %params ); is( $i->as_string, 'Foo Bar = Blah!', 'as_string() without track' ); delete $params{Album}; $params{Track} = 26; $i = Audio::MPD::Common::Item->new( %params ); is( $i->as_string, 'Foo Bar = Blah!', 'as_string() without album' ); delete $params{Artist}; $i = Audio::MPD::Common::Item->new( %params ); is( $i->as_string, 'Blah!', 'as_string() without artist' ); delete $params{Title}; $i = Audio::MPD::Common::Item->new( %params ); is( $i->as_string, 'some/random/path/to/a/song.ogg', 'as_string() without title' ); # # testing amc::item::directory $output = "directory: some/random/path\n"; @output = split /\n/, $output; %params = map { /^([^:]+):\s+(.*)$/ ? ($1=>$2) : () } @output; $i = Audio::MPD::Common::Item->new( %params ); isa_ok( $i, 'Audio::MPD::Common::Item::Directory', 'directory creation' ); is( $i->directory, 'some/random/path', 'accessor: directory' ); isa_ok( $i, 'Audio::MPD::Common::Item', 'directory inherits from item' ); # # testing amc::item::playlist $output = 'playlist: some_name Last-Modified: 2006-12-13T19:53:50Z '; @output = split /\n/, $output; %params = map { /^([^:]+):\s+(.*)$/ ? ($1=>$2) : () } @output; $i = Audio::MPD::Common::Item->new( %params ); isa_ok( $i, 'Audio::MPD::Common::Item::Playlist', 'playlist creation' ); is( $i->playlist, 'some_name', 'accessor: playlist' ); is( $i->last_modified, '2006-12-13T19:53:50Z', 'accessor: last_modified' ); isa_ok( $i, 'Audio::MPD::Common::Item', 'playlistinherits from item' ); time.t100644000764000144 273111734632062 16334 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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 strict; use warnings; use Audio::MPD::Common::Time; use Test::More tests => 14; # # formatted output my $time = Audio::MPD::Common::Time->new( time => '126:225' ); is( $time->sofar, '2:06', 'sofar() formats time so far' ); is( $time->left, '1:39', 'left() formats remaining time' ); is( $time->total, '3:45', 'sofar() formats time so far' ); is( $time->percent, '56.0', 'percent() gives percentage elapsed' ); # # so far is( $time->sofar_secs, 6, 'sofar_secs() gives seconds so far' ); is( $time->sofar_mins, 2, 'sofar_mins() gives minutes so far' ); is( $time->seconds_sofar, 126, 'seconds_sofar() gives time so far in secs' ); # # left details is( $time->left_secs, 39, 'left_secs() gives seconds left' ); is( $time->left_mins, 1, 'left_mins() gives minutes left' ); is( $time->seconds_left, 99, 'seconds_left() gives time left in secs' ); # # total details is( $time->total_secs, 45, 'total_secs() gives seconds total' ); is( $time->total_mins, 3, 'total_mins() gives minutes total' ); is( $time->seconds_total, 225, 'seconds_total() gives time total in secs' ); # # testing null time $time = Audio::MPD::Common::Time->new( time => '126:0' ); is( $time->percent, '0.0', 'percent() defaults to 0' ); META.yml100644000764000144 1557711734632062 16253 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881--- abstract: 'common helper classes for mpd' author: - 'Jerome Quelin' build_requires: File::Find: 0 File::Temp: 0 Module::Build: 0.3601 Test::More: 0.88 configure_requires: Module::Build: 0.3601 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300009, CPAN::Meta::Converter version 2.120630' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Audio-MPD-Common provides: Audio::MPD::Common: file: lib/Audio/MPD/Common.pm version: 1.120881 Audio::MPD::Common::Item: file: lib/Audio/MPD/Common/Item.pm version: 1.120881 Audio::MPD::Common::Item::Directory: file: lib/Audio/MPD/Common/Item/Directory.pm version: 1.120881 Audio::MPD::Common::Item::Playlist: file: lib/Audio/MPD/Common/Item/Playlist.pm version: 1.120881 Audio::MPD::Common::Item::Song: file: lib/Audio/MPD/Common/Item/Song.pm version: 1.120881 Audio::MPD::Common::Output: file: lib/Audio/MPD/Common/Output.pm version: 1.120881 Audio::MPD::Common::Stats: file: lib/Audio/MPD/Common/Stats.pm version: 1.120881 Audio::MPD::Common::Status: file: lib/Audio/MPD/Common/Status.pm version: 1.120881 Audio::MPD::Common::Time: file: lib/Audio/MPD/Common/Time.pm version: 1.120881 Audio::MPD::Common::Types: file: lib/Audio/MPD/Common/Types.pm version: 1.120881 requires: Moose: 0.92 Moose::Util::TypeConstraints: 0 MooseX::Has::Sugar: 0 MooseX::Types::Moose: 0 Readonly: 0 String::Formatter: 0 base: 0 overload: 0 perl: 5.008 strict: 0 warnings: 0 resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Audio-MPD-Common homepage: http://search.cpan.org/dist/Audio-MPD-Common/ repository: git://github.com/jquelin/audio-mpd-common.git x_MailingList: http://groups.google.com/group/audio-mpd version: 1.120881 x_Dist_Zilla: plugins: - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: 4.300009 - class: Dist::Zilla::Plugin::AutoVersion name: '@JQUELIN/AutoVersion' version: 4.300009 - class: Dist::Zilla::Plugin::GatherDir name: '@JQUELIN/GatherDir' version: 4.300009 - class: Dist::Zilla::Plugin::CompileTests name: '@JQUELIN/CompileTests' version: 1.112820 - class: Dist::Zilla::Plugin::HasVersionTests name: '@JQUELIN/HasVersionTests' version: 1.101420 - class: Dist::Zilla::Plugin::KwaliteeTests name: '@JQUELIN/KwaliteeTests' version: 2.03 - class: Dist::Zilla::Plugin::MinimumVersionTests name: '@JQUELIN/MinimumVersionTests' version: 2.0.1 - class: Dist::Zilla::Plugin::PodCoverageTests name: '@JQUELIN/PodCoverageTests' version: 4.300009 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@JQUELIN/PodSyntaxTests' version: 4.300009 - class: Dist::Zilla::Plugin::ReportVersions::Tiny name: '@JQUELIN/ReportVersions::Tiny' version: 1.03 - class: Dist::Zilla::Plugin::PruneCruft name: '@JQUELIN/PruneCruft' version: 4.300009 - class: Dist::Zilla::Plugin::PruneFiles name: '@JQUELIN/PruneFiles' version: 4.300009 - class: Dist::Zilla::Plugin::ManifestSkip name: '@JQUELIN/ManifestSkip' version: 4.300009 - class: Dist::Zilla::Plugin::AutoPrereqs name: '@JQUELIN/AutoPrereqs' version: 4.300009 - class: Dist::Zilla::Plugin::ExtraTests name: '@JQUELIN/ExtraTests' version: 4.300009 - class: Dist::Zilla::Plugin::NextRelease name: '@JQUELIN/NextRelease' version: 4.300009 - class: Dist::Zilla::Plugin::PkgVersion name: '@JQUELIN/PkgVersion' version: 4.300009 - class: Dist::Zilla::Plugin::PodWeaver name: '@JQUELIN/PodWeaver' version: 3.101641 - class: Dist::Zilla::Plugin::Prepender name: '@JQUELIN/Prepender' version: 1.112280 - class: Dist::Zilla::Plugin::ExecDir name: '@JQUELIN/ExecDir' version: 4.300009 - class: Dist::Zilla::Plugin::ShareDir name: '@JQUELIN/ShareDir' version: 4.300009 - class: Dist::Zilla::Plugin::Bugtracker name: '@JQUELIN/Bugtracker' version: 1.111080 - class: Dist::Zilla::Plugin::Homepage name: '@JQUELIN/Homepage' version: 1.101420 - class: Dist::Zilla::Plugin::Repository name: '@JQUELIN/Repository' version: 0.18 - class: Dist::Zilla::Plugin::MetaProvides::Package name: '@JQUELIN/MetaProvides::Package' version: 1.14000001 - class: Dist::Zilla::Plugin::MetaConfig name: '@JQUELIN/MetaConfig' version: 4.300009 - class: Dist::Zilla::Plugin::License name: '@JQUELIN/License' version: 4.300009 - class: Dist::Zilla::Plugin::MetaYAML name: '@JQUELIN/MetaYAML' version: 4.300009 - class: Dist::Zilla::Plugin::MetaJSON name: '@JQUELIN/MetaJSON' version: 4.300009 - class: Dist::Zilla::Plugin::ModuleBuild name: '@JQUELIN/ModuleBuild' version: 4.300009 - class: Dist::Zilla::Plugin::Readme name: '@JQUELIN/Readme' version: 4.300009 - class: Dist::Zilla::Plugin::Manifest name: '@JQUELIN/Manifest' version: 4.300009 - class: Dist::Zilla::Plugin::CheckChangeLog name: '@JQUELIN/CheckChangeLog' version: 0.01 - class: Dist::Zilla::Plugin::Git::Check name: '@JQUELIN/Git::Check' version: 1.120370 - class: Dist::Zilla::Plugin::Git::Commit name: '@JQUELIN/Git::Commit' version: 1.120370 - class: Dist::Zilla::Plugin::Git::CommitBuild name: '@JQUELIN/Git::CommitBuild' version: 1.120370 - class: Dist::Zilla::Plugin::Git::Tag name: '@JQUELIN/TagMaster' version: 1.120370 - class: Dist::Zilla::Plugin::Git::Tag name: '@JQUELIN/TagRelease' version: 1.120370 - class: Dist::Zilla::Plugin::Git::Push name: '@JQUELIN/Git::Push' version: 1.120370 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@JQUELIN/UploadToCPAN' version: 4.300009 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 4.300009 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 4.300009 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 4.300009 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 4.300009 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 4.300009 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 4.300009 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 4.300009 MANIFEST100644000764000144 112711734632062 16075 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881Build.PL Changes LICENSE MANIFEST META.json META.yml README dist.ini lib/Audio/MPD/Common.pm lib/Audio/MPD/Common/Item.pm lib/Audio/MPD/Common/Item/Directory.pm lib/Audio/MPD/Common/Item/Playlist.pm lib/Audio/MPD/Common/Item/Song.pm lib/Audio/MPD/Common/Output.pm 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/000-report-versions-tiny.t t/item.t t/output.t t/release-has-version.t t/release-kwalitee.t t/release-minimum-version.t t/release-pod-coverage.t t/release-pod-syntax.t t/stats.t t/status.t t/time.t Build.PL100644000764000144 172411734632062 16243 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881 use strict; use warnings; use Module::Build 0.3601; my %module_build_args = ( "build_requires" => { "File::Find" => 0, "File::Temp" => 0, "Module::Build" => "0.3601", "Test::More" => "0.88" }, "configure_requires" => { "Module::Build" => "0.3601" }, "dist_abstract" => "common helper classes for mpd", "dist_author" => [ "Jerome Quelin" ], "dist_name" => "Audio-MPD-Common", "dist_version" => "1.120881", "license" => "perl", "module_name" => "Audio::MPD::Common", "recommends" => {}, "recursive_test_files" => 1, "requires" => { "Moose" => "0.92", "Moose::Util::TypeConstraints" => 0, "MooseX::Has::Sugar" => 0, "MooseX::Types::Moose" => 0, "Readonly" => 0, "String::Formatter" => 0, "base" => 0, "overload" => 0, "perl" => "5.008", "strict" => 0, "warnings" => 0 }, "script_files" => [] ); my $build = Module::Build->new(%module_build_args); $build->create_build_script; stats.t100644000764000144 200111734632062 16522 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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 strict; use warnings; use Audio::MPD::Common::Stats; use Test::More tests => 8; my %kv = ( artists => 3, albums => 2, songs => 4, uptime => 10002, playtime => 5, db_playtime => 8, db_update => 1175631570, ); my $s = Audio::MPD::Common::Stats->new( \%kv ); isa_ok( $s, 'Audio::MPD::Common::Stats', 'object creation' ); is( $s->artists, 3, 'accessor: artists' ); is( $s->albums, 2, 'accessor: albums' ); is( $s->songs, 4, 'accessor: songs' ); is( $s->uptime, 10002, 'accessor: uptime' ); is( $s->playtime, 5, 'accessor: playtime' ); is( $s->db_playtime, 8, 'accessor: db_playtime' ); is( $s->db_update, 1175631570, 'accessor: db_update' ); META.json100644000764000144 2473311734632062 16415 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881{ "abstract" : "common helper classes for mpd", "author" : [ "Jerome Quelin" ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300009, CPAN::Meta::Converter version 2.120630", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Audio-MPD-Common", "prereqs" : { "build" : { "requires" : { "Module::Build" : "0.3601" } }, "configure" : { "requires" : { "Module::Build" : "0.3601" } }, "runtime" : { "requires" : { "Moose" : "0.92", "Moose::Util::TypeConstraints" : "0", "MooseX::Has::Sugar" : "0", "MooseX::Types::Moose" : "0", "Readonly" : "0", "String::Formatter" : "0", "base" : "0", "overload" : "0", "perl" : "5.008", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "File::Find" : "0", "File::Temp" : "0", "Test::More" : "0.88" } } }, "provides" : { "Audio::MPD::Common" : { "file" : "lib/Audio/MPD/Common.pm", "version" : "1.120881" }, "Audio::MPD::Common::Item" : { "file" : "lib/Audio/MPD/Common/Item.pm", "version" : "1.120881" }, "Audio::MPD::Common::Item::Directory" : { "file" : "lib/Audio/MPD/Common/Item/Directory.pm", "version" : "1.120881" }, "Audio::MPD::Common::Item::Playlist" : { "file" : "lib/Audio/MPD/Common/Item/Playlist.pm", "version" : "1.120881" }, "Audio::MPD::Common::Item::Song" : { "file" : "lib/Audio/MPD/Common/Item/Song.pm", "version" : "1.120881" }, "Audio::MPD::Common::Output" : { "file" : "lib/Audio/MPD/Common/Output.pm", "version" : "1.120881" }, "Audio::MPD::Common::Stats" : { "file" : "lib/Audio/MPD/Common/Stats.pm", "version" : "1.120881" }, "Audio::MPD::Common::Status" : { "file" : "lib/Audio/MPD/Common/Status.pm", "version" : "1.120881" }, "Audio::MPD::Common::Time" : { "file" : "lib/Audio/MPD/Common/Time.pm", "version" : "1.120881" }, "Audio::MPD::Common::Types" : { "file" : "lib/Audio/MPD/Common/Types.pm", "version" : "1.120881" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-audio-mpd-common at rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=Audio-MPD-Common" }, "homepage" : "http://search.cpan.org/dist/Audio-MPD-Common/", "repository" : { "type" : "git", "url" : "git://github.com/jquelin/audio-mpd-common.git", "web" : "http://github.com/jquelin/audio-mpd-common" }, "x_MailingList" : "http://groups.google.com/group/audio-mpd" }, "version" : "1.120881", "x_Dist_Zilla" : { "plugins" : [ { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::AutoVersion", "name" : "@JQUELIN/AutoVersion", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::GatherDir", "name" : "@JQUELIN/GatherDir", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::CompileTests", "name" : "@JQUELIN/CompileTests", "version" : "1.112820" }, { "class" : "Dist::Zilla::Plugin::HasVersionTests", "name" : "@JQUELIN/HasVersionTests", "version" : "1.101420" }, { "class" : "Dist::Zilla::Plugin::KwaliteeTests", "name" : "@JQUELIN/KwaliteeTests", "version" : "2.03" }, { "class" : "Dist::Zilla::Plugin::MinimumVersionTests", "name" : "@JQUELIN/MinimumVersionTests", "version" : "2.0.1" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@JQUELIN/PodCoverageTests", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@JQUELIN/PodSyntaxTests", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", "name" : "@JQUELIN/ReportVersions::Tiny", "version" : "1.03" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@JQUELIN/PruneCruft", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::PruneFiles", "name" : "@JQUELIN/PruneFiles", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@JQUELIN/ManifestSkip", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@JQUELIN/AutoPrereqs", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::ExtraTests", "name" : "@JQUELIN/ExtraTests", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@JQUELIN/NextRelease", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@JQUELIN/PkgVersion", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "name" : "@JQUELIN/PodWeaver", "version" : "3.101641" }, { "class" : "Dist::Zilla::Plugin::Prepender", "name" : "@JQUELIN/Prepender", "version" : "1.112280" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@JQUELIN/ExecDir", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@JQUELIN/ShareDir", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::Bugtracker", "name" : "@JQUELIN/Bugtracker", "version" : "1.111080" }, { "class" : "Dist::Zilla::Plugin::Homepage", "name" : "@JQUELIN/Homepage", "version" : "1.101420" }, { "class" : "Dist::Zilla::Plugin::Repository", "name" : "@JQUELIN/Repository", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "name" : "@JQUELIN/MetaProvides::Package", "version" : "1.14000001" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@JQUELIN/MetaConfig", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@JQUELIN/License", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@JQUELIN/MetaYAML", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@JQUELIN/MetaJSON", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::ModuleBuild", "name" : "@JQUELIN/ModuleBuild", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@JQUELIN/Readme", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@JQUELIN/Manifest", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::CheckChangeLog", "name" : "@JQUELIN/CheckChangeLog", "version" : "0.01" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@JQUELIN/Git::Check", "version" : "1.120370" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@JQUELIN/Git::Commit", "version" : "1.120370" }, { "class" : "Dist::Zilla::Plugin::Git::CommitBuild", "name" : "@JQUELIN/Git::CommitBuild", "version" : "1.120370" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@JQUELIN/TagMaster", "version" : "1.120370" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@JQUELIN/TagRelease", "version" : "1.120370" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@JQUELIN/Git::Push", "version" : "1.120370" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@JQUELIN/UploadToCPAN", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "4.300009" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "4.300009" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "4.300009" } } } output.t100644000764000144 126511734632062 16737 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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 strict; use warnings; use Audio::MPD::Common::Output; use Test::More tests => 4; my %kv = ( id => 3, name => "my soundcard", enabled => 1, ); my $s = Audio::MPD::Common::Output->new( \%kv ); isa_ok( $s, 'Audio::MPD::Common::Output', 'object creation' ); is( $s->id, 3, 'accessor: id' ); is( $s->name, "my soundcard", 'accessor: name' ); is( $s->enabled, 1, 'accessor: enabled' ); status.t100644000764000144 372711734632062 16727 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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 strict; use warnings; use Audio::MPD::Common::Status; use Test::More tests => 15; my %kv = ( volume => 66, repeat => 1, random => 0, playlist => 24, playlistlength => 21, xfade => 14, state => 'play', song => 10, songid => 11, time => '45:214', bitrate => 127, audio => '44100:16:2', error => 'problems opening audio device', updating_db => 1, ); my $s = Audio::MPD::Common::Status->new( \%kv ); isa_ok( $s, 'Audio::MPD::Common::Status', 'object creation' ); isa_ok( $s->time, 'Audio::MPD::Common::Time', 'accessor: time' ); is( $s->volume, 66, 'accessor: volume' ); is( $s->repeat, 1, 'accessor: repeat' ); is( $s->random, 0, 'accessor: random' ); is( $s->playlist, 24, 'accessor: playlist' ); is( $s->playlistlength, 21, 'accessor: playlistlength' ); is( $s->xfade, 14, 'accessor: xfade' ); is( $s->state, 'play', 'accessor: state' ); is( $s->song, 10, 'accessor: song' ); is( $s->songid, 11, 'accessor: songid' ); is( $s->bitrate, 127, 'accessor: bitrate' ); is( $s->audio, '44100:16:2', 'accessor: audio' ); is( $s->error, 'problems opening audio device', 'accessor: error' ); is( $s->updating_db, 1, 'accessor: updating_db' ); 00-compile.t100644000764000144 351011734632062 17237 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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 strict; use warnings; use Test::More; use File::Find; use File::Temp qw{ tempdir }; my @modules; find( sub { return if $File::Find::name !~ /\.pm\z/; my $found = $File::Find::name; $found =~ s{^lib/}{}; $found =~ s{[/\\]}{::}g; $found =~ s/\.pm$//; # nothing to skip push @modules, $found; }, 'lib', ); sub _find_scripts { my $dir = shift @_; my @found_scripts = (); find( sub { return unless -f; my $found = $File::Find::name; # nothing to skip open my $FH, '<', $_ or do { note( "Unable to open $found in ( $! ), skipping" ); return; }; my $shebang = <$FH>; return unless $shebang =~ /^#!.*?\bperl\b\s*$/; push @found_scripts, $found; }, $dir, ); return @found_scripts; } my @scripts; do { push @scripts, _find_scripts($_) if -d $_ } for qw{ bin script scripts }; my $plan = scalar(@modules) + scalar(@scripts); $plan ? (plan tests => $plan) : (plan skip_all => "no tests to run"); { # fake home for cpan-testers # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 ); like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) for sort @modules; SKIP: { eval "use Test::Script 1.05; 1;"; skip "Test::Script needed to test script compilation", scalar(@scripts) if $@; foreach my $file ( @scripts ) { my $script = $file; $script =~ s!.*/!!; script_compiles( $file, "$script script compiles" ); } } } release-kwalitee.t100644000764000144 120211734632062 20611 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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. # BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } # This test is generated by Dist::Zilla::Plugin::Test::Kwalitee use strict; use warnings; use Test::More; # needed to provide plan. eval "use Test::Kwalitee"; plan skip_all => "Test::Kwalitee required for testing kwalitee" if $@; release-pod-syntax.t100644000764000144 103311734632062 21114 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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. # BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); MPD000755000764000144 011734632062 17032 5ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/AudioCommon.pm100644000764000144 455611734632062 20772 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD# # 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 strict; use warnings; package Audio::MPD::Common; { $Audio::MPD::Common::VERSION = '1.120881'; } # ABSTRACT: common helper classes for mpd 1; =pod =head1 NAME Audio::MPD::Common - common helper classes for mpd =head1 VERSION version 1.120881 =head1 DESCRIPTION Depending on whether you're using a POE-aware environment or not, people wanting to tinker with mpd (Music Player Daemon) will use either L or L. But even if the run-cores of those two modules differ completely, they are using the exact same common classes to represent the various mpd states and information. Therefore, those common classes have been outsourced to L. This module does not export any methods, but the dist provides the following classes that you can query with perldoc: =over 4 =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =back Note that those modules should not be of any use outside the two mpd modules afore-mentioned. =head1 SEE ALSO You can look for information on this module at: =over 4 =item * Search CPAN L =item * See open / report bugs L =item * Git repository L =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =back You may want to look at the modules really accessing MPD: =over 4 =item * L =item * L =back =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__ release-has-version.t100644000764000144 105611734632062 21251 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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. # BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::HasVersion"; plan skip_all => "Test::HasVersion required for testing version numbers" if $@; all_pm_version_ok(); release-pod-coverage.t100644000764000144 135011734632062 21363 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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. # BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); release-minimum-version.t100644000764000144 111111734632062 22141 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/t#!perl # # 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. # BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_from_metayml_ok(); Common000755000764000144 011734632062 20262 5ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPDItem.pm100644000764000144 426011734632062 21660 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common# # 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 strict; use warnings; package Audio::MPD::Common::Item; { $Audio::MPD::Common::Item::VERSION = '1.120881'; } # ABSTRACT: a generic collection item use Audio::MPD::Common::Item::Directory; use Audio::MPD::Common::Item::Playlist; use Audio::MPD::Common::Item::Song; # -- constructor sub new { my ($pkg, %params) = @_; # transform keys in lowercase, remove dashes "-" my %lowcase; @lowcase{ map { s/-/_/; lc } keys %params } = values %params; return Audio::MPD::Common::Item::Song->new(\%lowcase) if exists $params{file}; return Audio::MPD::Common::Item::Directory->new(\%lowcase) if exists $params{directory}; return Audio::MPD::Common::Item::Playlist->new(\%lowcase) if exists $params{playlist}; } 1; =pod =head1 NAME Audio::MPD::Common::Item - a generic collection item =head1 VERSION version 1.120881 =head1 SYNOPSIS my $item = Audio::MPD::Common::Item->new( %params ); =head1 DESCRIPTION L is a virtual class representing a generic item of mpd's collection. It can be either a song, a directory or a playlist. Depending on the params given to C, it will create and return an L, an L or an L object. Currently, the discrimination is done on the existence of the C key of C<%params>. =head1 METHODS =head2 my $item = Audio::MPD::Common::Item->new( %params ); Create and return either an L, an L or an L object, depending on the existence of a key C, C or C (respectively). =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__ Time.pm100644000764000144 1176611734632062 21711 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common# # 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 strict; use warnings; package Audio::MPD::Common::Time; { $Audio::MPD::Common::Time::VERSION = '1.120881'; } # ABSTRACT: class representing time of current song use Moose 0.92; # need hash trait # -- attributes has time => ( is=>'ro', isa=>'Str', default=>'0:0' ); # _cooked_values contains all the computed values. has _cooked_values => ( traits => [ 'Hash' ], is => 'ro', isa => 'HashRef', lazy_build => 1, handles => { percent => [ get => 'percent' ], sofar => [ get => 'sofar' ], left => [ get => 'left' ], total => [ get => 'total' ], sofar_secs => [ get => 'sofar_secs' ], sofar_mins => [ get => 'sofar_mins' ], seconds_sofar => [ get => 'seconds_sofar' ], total_secs => [ get => 'total_secs' ], total_mins => [ get => 'total_mins' ], seconds_total => [ get => 'seconds_total' ], left_secs => [ get => 'left_secs' ], left_mins => [ get => 'left_mins' ], seconds_left => [ get => 'seconds_left' ], }, ); # -- builders sub _build__cooked_values { my $self = shift; my $time = $self->time; my ($seconds_sofar, $seconds_total) = split /:/, $time; my $seconds_left = $seconds_total - $seconds_sofar; my $percent = $seconds_total ? 100*$seconds_sofar/$seconds_total : 0; # Parse the time so far my $sofar_mins = int( $seconds_sofar / 60 ); my $sofar_secs = $seconds_sofar % 60; my $sofar = sprintf "%d:%02d", $sofar_mins, $sofar_secs; # Parse the total time my $total_mins = int( $seconds_total / 60 ); my $total_secs = $seconds_total % 60; my $total = sprintf "%d:%02d", $total_mins, $total_secs; # Parse the time left my $left_mins = int( $seconds_left / 60 ); my $left_secs = $seconds_left % 60; my $left = sprintf "%d:%02d", $left_mins, $left_secs; return { # time elapsed in seconds seconds_sofar => $seconds_sofar, seconds_left => $seconds_left, seconds_total => $seconds_total, # cooked values sofar => $sofar, left => $left, total => $total, percent => sprintf("%.1f", $percent), # 1 decimal # details sofar_secs => $sofar_secs, sofar_mins => $sofar_mins, total_secs => $total_secs, total_mins => $total_mins, left_secs => $left_secs, left_mins => $left_mins, }; } 1; =pod =head1 NAME Audio::MPD::Common::Time - class representing time of current song =head1 VERSION version 1.120881 =head1 DESCRIPTION L returns some time information with the C accessor. This information relates to the elapsed time of the current song, as well as the remaining and total time. This information is encapsulated in an L object. An L object does B update itself regularly, and thus should be used immediately. Note: one should B ever instantiate an L 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 format). =head2 my $str = $time->left; Return remaining C<$time> (C format). =head2 my $str = $time->left; Return total C<$time> (C 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 =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__ 000-report-versions-tiny.t100644000764000144 470311734632062 22036 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/tuse strict; use warnings; use Test::More 0.88; # This is a relatively nice way to avoid Test::NoWarnings breaking our # expectations by adding extra tests, without using no_plan. It also helps # avoid any other test module that feels introducing random tests, or even # test plans, is a nice idea. our $success = 0; END { $success && done_testing; } my $v = "\n"; eval { # no excuses! # report our Perl details my $want = '5.008'; my $pv = ($^V || $]); $v .= "perl: $pv (wanted $want) on $^O from $^X\n\n"; }; defined($@) and diag("$@"); # Now, our module version dependencies: sub pmver { my ($module, $wanted) = @_; $wanted = " (want $wanted)"; my $pmver; eval "require $module;"; if ($@) { if ($@ =~ m/Can't locate .* in \@INC/) { $pmver = 'module not found.'; } else { diag("${module}: $@"); $pmver = 'died during require.'; } } else { my $version; eval { $version = $module->VERSION; }; if ($@) { diag("${module}: $@"); $pmver = 'died during VERSION check.'; } elsif (defined $version) { $pmver = "$version"; } else { $pmver = ''; } } # So, we should be good, right? return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); } eval { $v .= pmver('File::Find','any version') }; eval { $v .= pmver('File::Temp','any version') }; eval { $v .= pmver('Module::Build','0.3601') }; eval { $v .= pmver('Moose','0.92') }; eval { $v .= pmver('Moose::Util::TypeConstraints','any version') }; eval { $v .= pmver('MooseX::Has::Sugar','any version') }; eval { $v .= pmver('MooseX::Types::Moose','any version') }; eval { $v .= pmver('Readonly','any version') }; eval { $v .= pmver('String::Formatter','any version') }; eval { $v .= pmver('Test::More','0.88') }; eval { $v .= pmver('base','any version') }; eval { $v .= pmver('overload','any version') }; eval { $v .= pmver('strict','any version') }; eval { $v .= pmver('warnings','any version') }; # All done. $v .= <<'EOT'; Thanks for using my code. I hope it works for you. If not, please try and include this output in the bug report. That will help me reproduce the issue and solve you problem. EOT diag($v); ok(1, "we really didn't test anything, just reporting data"); $success = 1; # Work around another nasty module on CPAN. :/ no warnings 'once'; $Template::Test::NO_FLUSH = 1; exit 0; Stats.pm100644000764000144 416211734632062 22061 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common# # 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 strict; use warnings; package Audio::MPD::Common::Stats; { $Audio::MPD::Common::Stats::VERSION = '1.120881'; } # ABSTRACT: class representing MPD stats use Moose; use MooseX::Has::Sugar; use MooseX::Types::Moose qw{ Int }; # -- public attributes 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; =pod =head1 NAME Audio::MPD::Common::Stats - class representing MPD stats =head1 VERSION version 1.120881 =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 object. An L object does B update itself regularly, and thus should be used immediately. Note: one should B ever instantiate an L object directly - use the mpd modules instead. =head1 ATTRIBUTES =head2 $stats->artists; Number of artists in the music database. =head2 $stats->albums; Number of albums in the music database. =head2 $stats->songs; Number of songs in the music database. =head2 $stats->uptime; Daemon uptime (time since last startup) in seconds. =head2 $stats->playtime; Time length of music played. =head2 $stats->db_playtime; Sum of all song times in the music database. =head2 $stats->db_update; Last database update in UNIX 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__ Types.pm100644000764000144 253611734632062 22072 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common# # 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; { $Audio::MPD::Common::Types::VERSION = '1.120881'; } # 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; =pod =head1 NAME Audio::MPD::Common::Types - types used in the distribution =head1 VERSION version 1.120881 =head1 DESCRIPTION This module implements the specific types used by the distribution, and exports them (exporting is done by L). Current types defined: =over 4 =item * State - a simple enumeration, allowing C, C and C. =back It also defines a type coertion from C to C. =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__ Output.pm100644000764000144 324511734632062 22264 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common# # 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 strict; use warnings; package Audio::MPD::Common::Output; { $Audio::MPD::Common::Output::VERSION = '1.120881'; } # ABSTRACT: class representing MPD output use Moose; use MooseX::Has::Sugar; # -- public attributes has id => ( ro, isa=>"Int", required ); has name => ( ro, isa=>"Str", required ); has enabled => ( ro, isa=>"Bool", required ); 1; =pod =head1 NAME Audio::MPD::Common::Output - class representing MPD output =head1 VERSION version 1.120881 =head1 DESCRIPTION The MPD server can have various outputs defined, generally one per sound card. Those output can be queried with the mpd modules. Some of those information are served to you as an L object. An L object does B update itself regularly, and thus should be used immediately. Note: one should B ever instantiate an L object directly - use the mpd modules instead. =head1 ATTRIBUTES =head2 $output->id; Internal MPD id for the output. =head2 $output->name; Friendly-name for the output. =head2 $output->enabled; Boolean stating whether the output is enabled or not. =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__ Status.pm100644000764000144 636711734632062 22257 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common# # 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 strict; use warnings; package Audio::MPD::Common::Status; { $Audio::MPD::Common::Status::VERSION = '1.120881'; } # ABSTRACT: class representing MPD status use Moose; use MooseX::Has::Sugar; use MooseX::Types::Moose qw{ Bool Int Str }; use Audio::MPD::Common::Time; use Audio::MPD::Common::Types; # -- public attributes 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; =pod =head1 NAME Audio::MPD::Common::Status - class representing MPD status =head1 VERSION version 1.120881 =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 object. An L object does B update itself regularly, and thus should be used immediately. Note: one should B ever instantiate an L object directly - use the mpd modules instead. =head1 ATTRIBUTES =head2 $status->audio; A string with the sample rate of the song currently playing, number of bits of the output and number of channels (2 for stereo) - separated by a colon. =head2 $status->bitrate; The instantaneous bitrate in kbps. =head2 $status->error; May appear in special error cases, such as when disabling output. =head2 $status->playlist; The playlist version number, that changes every time the playlist is updated. =head2 $status->playlistlength; The number of songs in the playlist. =head2 $status->random; Whether the playlist is read randomly or not. =head2 $status->repeat; Whether the song is repeated or not. =head2 $status->song; The offset of the song currently played in the playlist. =head2 $status->songid; The song id (MPD id) of the song currently played. =head2 $status->state; The state of MPD server. Either C, C or C. =head2 $status->time; An L object, representing the time elapsed / remainging and total. See the associated pod for more details. =head2 $status->updating_db; An integer, representing the current update job. =head2 $status->volume; The current MPD volume - an integer between 0 and 100. =head2 $status->xfade; The crossfade in seconds. =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__ Item000755000764000144 011734632062 21160 5ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/CommonSong.pm100644000764000144 1123711734632062 22610 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common/Item# # 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 strict; use warnings; package Audio::MPD::Common::Item::Song; { $Audio::MPD::Common::Item::Song::VERSION = '1.120881'; } # ABSTRACT: a song object with some audio tags use Moose; use MooseX::Has::Sugar; use MooseX::Types::Moose qw{ Int Str }; use Readonly; use String::Formatter method_stringf => { -as => '_stringf', codes => { A => sub { $_[0]->albumartist }, a => sub { $_[0]->artist }, C => sub { $_[0]->composer }, D => sub { $_[0]->disc }, d => sub { $_[0]->album }, f => sub { $_[0]->file }, g => sub { $_[0]->genre }, i => sub { $_[0]->id }, l => sub { $_[0]->time }, M => sub { $_[0]->date }, m => sub { $_[0]->last_modified }, N => sub { $_[0]->name }, n => sub { $_[0]->track }, P => sub { $_[0]->performer }, p => sub { $_[0]->pos }, t => sub { $_[0]->title }, }, }; use base qw{ Audio::MPD::Common::Item }; use overload '""' => \&as_string; Readonly my $SEP => ' = '; # -- public attributes has album => ( rw, isa => Str ); has albumartist => ( rw, isa => Str ); has artist => ( rw, isa => Str ); has composer => ( 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 last_modified => ( rw, isa => Str ); has id => ( rw, isa => Int ); has name => ( rw, isa => Str ); has pos => ( rw, isa => Int ); has performer => ( rw, isa => Str ); has title => ( rw, isa => Str ); has track => ( rw, isa => Str ); has time => ( rw, isa => Int ); # -- public methods sub as_string { my ($self, $format) = @_; return _stringf($format, $self) if $format; return $self->file unless defined $self->title; my $str = $self->title; return $str unless defined $self->artist; $str = $self->artist . $SEP . $str; return $str unless defined $self->album && defined $self->track; return join $SEP, $self->album, $self->track, $str; } 1; =pod =head1 NAME Audio::MPD::Common::Item::Song - a song object with some audio tags =head1 VERSION version 1.120881 =head1 DESCRIPTION L 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's constructor. =head1 ATTRIBUTES =head2 album Album of the song. (format code: %d) =head2 artist Artist of the song. (format code: %a) =head2 albumartist Artist of the album. (format code: %A) =head2 composer Song composer. (format code: %C) =head2 date Last modification date of the song. (format code: %M) =head2 disc Disc number of the album. This is a string to allow tags such as C<1/2>. (format code: %D) =head2 file Path to the song. Only attribute which will always be defined. (format code: %f) =head2 genre Genre of the song. (format code: %g) =head2 id Id of the song in MPD's database. (format code: %i) =head2 last_modified Last time the song was modified. (format code: %m) =head2 name Name of the song (for http streams). (format code: %N) =head2 performer Song performer. (format code: %P) =head2 pos Position of the song in the playlist. (format code: %p) =head2 title Title of the song. (format code: %t) =head2 track Track number of the song. (format code: %n) =head2 time Length of the song in seconds. (format code: %l) =head1 METHODS =head2 as_string my $str = $song->as_string( [$format] ); Return a string representing $song. If C<$format> is specified, use it to format the string. Otherwise, the string returned will be: =over 4 =item either "album = track = artist = title" =item or "artist = title" =item or "title" =item or "file" =back (in this order), depending on the existing tags of the song. The last possibility always exist of course, since it's a path. This method is also used to automatically stringify the C<$song>. B the format codes are not yet definitive and may be subject to change! =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__ Playlist.pm100644000764000144 250211734632062 23456 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common/Item# # 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 strict; use warnings; package Audio::MPD::Common::Item::Playlist; { $Audio::MPD::Common::Item::Playlist::VERSION = '1.120881'; } # ABSTRACT: a playlist object use Moose; use MooseX::Has::Sugar; use MooseX::Types::Moose qw{ Str }; use base qw{ Audio::MPD::Common::Item }; # -- public attributes has last_modified => ( rw, isa=>Str ); has playlist => ( rw, isa=>Str, required ); 1; =pod =head1 NAME Audio::MPD::Common::Item::Playlist - a playlist object =head1 VERSION version 1.120881 =head1 DESCRIPTION L is more a placeholder with some attributes. The constructor should only be called by L's constructor. =head1 ATTRIBUTES =head2 $item->last_modified; Last modification date. =head2 $item->playlist; Path to the playlist file. =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__ Directory.pm100644000764000144 235611734632062 23630 0ustar00jquelinusers000000000000Audio-MPD-Common-1.120881/lib/Audio/MPD/Common/Item# # 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 strict; use warnings; package Audio::MPD::Common::Item::Directory; { $Audio::MPD::Common::Item::Directory::VERSION = '1.120881'; } # ABSTRACT: a directory object use Moose; use MooseX::Has::Sugar; use MooseX::Types::Moose qw{ Str }; use base qw{ Audio::MPD::Common::Item }; # -- public attributes has directory => ( rw, isa=>Str, required ); 1; =pod =head1 NAME Audio::MPD::Common::Item::Directory - a directory object =head1 VERSION version 1.120881 =head1 DESCRIPTION L is more a placeholder with some attributes. The constructor should only be called by L's constructor. =head1 ATTRIBUTES =head2 $item->directory; The path to the item's directory. =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__