diff -Nru libcddb-perl-1.220/CHANGES libcddb-perl-1.222/CHANGES --- libcddb-perl-1.220/CHANGES 2010-03-08 06:24:41.000000000 +0000 +++ libcddb-perl-1.222/CHANGES 2013-08-15 07:12:57.000000000 +0000 @@ -1,60 +1,56 @@ -================================ -2010-03-08 01:18:09 -0500 v1_220 -================================ +================================================== +Changes from 2012-08-15 00:00:00 +0000 to present. +================================================== - commit 90608ec10375b0009035a5f9e9df9c23a280e680 - Author: Rocco Caputo - Date: Mon Mar 8 01:18:09 2010 -0500 - - Prepare for git based distribution toolchain. +------------------------------------------ +version 1.222 at 2013-08-15 07:12:54 +0000 +------------------------------------------ - commit 65c2a4db273159842360735bdfa41de008de295a + Change: 3161b01391d7ec55d7fd8f06b6de9ceb31126416 Author: Rocco Caputo - Date: Mon Mar 8 01:14:12 2010 -0500 - - Rearrange repository for git. + Date : 2013-08-15 03:03:53 +0000 - commit 2dc0e52f96553ea8f4adc285e87c6dfe3f9a6979 - Author: Rocco Caputo - Date: Tue Aug 11 04:56:35 2009 -0400 - - Create an OSX example program for Max Wassermann. - -=============================== -2009-07-27 16:01:44 -0400 v1_21 -=============================== + Automate more of dist.ini. + +------------------------------------------ +version 1.221 at 2013-08-04 06:13:24 +0000 +------------------------------------------ - commit 9499e229156600db9e8233469aecf694c87ce6ed + Change: 4e0b8cc01214485a5d4f40b7318f2646f84c5ccb Author: Rocco Caputo - Date: Mon Jul 27 16:01:44 2009 -0400 - - Reorganize documentation links. + Date : 2013-08-04 02:13:24 +0000 - commit aad2ecd99348e5f27afe131ec8e06c2c3e7ec298 + Add .gitignore and MANIFEST.SKIP to ignore build artifacts. + + Releases will fail because the release built artifacts look like + untracked files. Ignore them in .gitignore. Also ignore temporary + files in MANIFEST.SKIP. + + Change: c5467dc4260c3ceb57e8253957c1449d3d00617a Author: Rocco Caputo - Date: Mon Jul 27 04:39:24 2009 -0400 - - Add machine-readable repository directory. Add BUG TRACKER, - REPOSITORY and OTHER RESOURCES to the documentation. - -=============================== -2009-07-26 03:54:11 -0400 v1_20 -=============================== + Date : 2013-08-04 02:01:30 +0000 + + [rt.cpan.org 65060] Don't destroy the server list when connections + fail. - commit 9f4b0b679b787d46823fbf27c0758aa4aedcba61 + Connections may fail for transient reasons. It's better to assume the + servers will come back eventually and take the performance hit on + reconnect than to exhaust the list and never succeed again. + + If this fix helps you, thank Timo Santi for reporting the bug. + + Change: b9835824080c25817a37bcbf6d1c3bb4ab5d51f7 Author: Rocco Caputo - Date: Sun Jul 26 03:54:11 2009 -0400 - - Upgrade tests to Test::More. Fix track offset calculations according - to documented test input. Fix test input to match FreeDB - documentation. Many thanks to Chuck Cranor for reporting the issue. + Date : 2013-08-04 01:43:39 +0000 + + Switch to Dist::Zilla. - commit ab74fb8fcc3af103c6641135fd69113aa7311091 + Change: 15ec95acbfed79a4f4e341e150af25964fc776a3 Author: Rocco Caputo - Date: Mon Nov 6 19:20:39 2006 -0500 - - Set a LICENSE. Cheap kwalitee points! - -============== -End of Excerpt -============== + Date : 2010-03-08 01:29:07 +0000 + + Fix the repository URLs and copyright date in the docs. + +================================================ +Plus 4 releases after 2012-08-15 00:00:00 +0000. +================================================ diff -Nru libcddb-perl-1.220/LICENSE libcddb-perl-1.222/LICENSE --- libcddb-perl-1.220/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ libcddb-perl-1.222/LICENSE 2013-08-15 07:12:57.000000000 +0000 @@ -0,0 +1,379 @@ +This software is copyright (c) 2013 by Rocco Caputo . + +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) 2013 by Rocco Caputo . + +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) 2013 by Rocco Caputo . + +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 + diff -Nru libcddb-perl-1.220/MANIFEST libcddb-perl-1.222/MANIFEST --- libcddb-perl-1.220/MANIFEST 2010-03-08 06:24:41.000000000 +0000 +++ libcddb-perl-1.222/MANIFEST 2013-08-15 07:12:57.000000000 +0000 @@ -1,10 +1,17 @@ -# $Id$ CHANGES HISTORY +LICENSE MANIFEST +MANIFEST.SKIP +META.json +META.yml Makefile.PL README +README.mkdn +dist.ini +eg/osx-lookup.pl lib/CDDB.pm +t/000-report-versions.t t/01_cddb.t -eg/osx-lookup.pl -META.yml Module meta-data (added by MakeMaker) +t/release-pod-coverage.t +t/release-pod-syntax.t diff -Nru libcddb-perl-1.220/MANIFEST.SKIP libcddb-perl-1.222/MANIFEST.SKIP --- libcddb-perl-1.220/MANIFEST.SKIP 1970-01-01 00:00:00.000000000 +0000 +++ libcddb-perl-1.222/MANIFEST.SKIP 2013-08-15 07:12:57.000000000 +0000 @@ -0,0 +1,26 @@ +CVS +\.\# +\.bak$ +\.cvsignore +\.git +\.gz$ +\.orig$ +\.patch$ +\.ppd$ +\.rej$ +\.rej$ +\.svn +\.swo$ +\.swp$ +^Makefile$ +^Makefile\.old$ +^\. +^_Inline +^_build +^blib/ +^comptest +^cover_db +^coverage\.report$ +^pm_to_blib$ +~$ +devel diff -Nru libcddb-perl-1.220/META.json libcddb-perl-1.222/META.json --- libcddb-perl-1.220/META.json 1970-01-01 00:00:00.000000000 +0000 +++ libcddb-perl-1.222/META.json 2013-08-15 07:12:57.000000000 +0000 @@ -0,0 +1,72 @@ +{ + "abstract" : "a high-level interface to cddb protocol servers (freedb and CDDB)", + "author" : [ + "Rocco Caputo " + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 4.300035, CPAN::Meta::Converter version 2.132140", + "license" : [ + "perl_5" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "CDDB", + "prereqs" : { + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "6.30" + } + }, + "develop" : { + "requires" : { + "Pod::Coverage::TrustPod" : "0", + "Test::Pod" : "1.41", + "Test::Pod::Coverage" : "1.08" + } + }, + "runtime" : { + "requires" : { + "Carp" : "1.26", + "Encode" : "2.51", + "HTTP::Request" : "6.00", + "IO::Socket" : "1.31", + "LWP" : "6.05", + "MIME::QuotedPrint" : "3.13", + "Mail::Header" : "2.04", + "Mail::Internet" : "2.04", + "Sys::Hostname" : "1.11", + "perl" : "5.001", + "strict" : "0", + "vars" : "0" + } + }, + "test" : { + "requires" : { + "Scalar::Util" : "1.29", + "Test::More" : "0.98", + "perl" : "5.004", + "warnings" : "0" + } + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "mailto" : "bug-CDDB@rt.cpan.org", + "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=CDDB" + }, + "homepage" : "http://search.cpan.org/dist/CDDB/", + "license" : [ + "http://dev.perl.org/licenses/" + ], + "repository" : { + "type" : "git", + "url" : "git://github.com/rcaputo/cddb-perl.git", + "web" : "https://github.com/rcaputo/cddb-perl" + } + }, + "version" : "1.222" +} + diff -Nru libcddb-perl-1.220/META.yml libcddb-perl-1.222/META.yml --- libcddb-perl-1.220/META.yml 2010-03-08 06:24:41.000000000 +0000 +++ libcddb-perl-1.222/META.yml 2013-08-15 07:12:57.000000000 +0000 @@ -1,25 +1,37 @@ ---- #YAML:1.0 -name: CDDB -version: 1.220 -abstract: High-level interface to CDDB and freedb servers. +--- +abstract: 'a high-level interface to cddb protocol servers (freedb and CDDB)' author: - - Rocco Caputo -license: perl -distribution_type: module -configure_requires: - ExtUtils::MakeMaker: 0 + - 'Rocco Caputo ' build_requires: - ExtUtils::MakeMaker: 0 + Scalar::Util: 1.29 + Test::More: 0.98 + perl: 5.004 + warnings: 0 +configure_requires: + ExtUtils::MakeMaker: 6.30 +dynamic_config: 0 +generated_by: 'Dist::Zilla version 4.300035, CPAN::Meta::Converter version 2.132140' +license: perl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: CDDB requires: - Test::More: 0 + Carp: 1.26 + Encode: 2.51 + HTTP::Request: 6.00 + IO::Socket: 1.31 + LWP: 6.05 + MIME::QuotedPrint: 3.13 + Mail::Header: 2.04 + Mail::Internet: 2.04 + Sys::Hostname: 1.11 + perl: 5.001 + strict: 0 + vars: 0 resources: - license: http://dev.perl.org/licenses/ - repository: http://github.com/rcaputo/cddb-perl -no_index: - directory: - - t - - inc -generated_by: ExtUtils::MakeMaker version 6.54 -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=CDDB + homepage: http://search.cpan.org/dist/CDDB/ + license: http://dev.perl.org/licenses/ + repository: git://github.com/rcaputo/cddb-perl.git +version: 1.222 diff -Nru libcddb-perl-1.220/Makefile.PL libcddb-perl-1.222/Makefile.PL --- libcddb-perl-1.220/Makefile.PL 2010-03-08 06:16:41.000000000 +0000 +++ libcddb-perl-1.222/Makefile.PL 2013-08-15 07:12:57.000000000 +0000 @@ -1,30 +1,79 @@ -#!/usr/bin/perl -use ExtUtils::MakeMaker; +use strict; +use warnings; -## Touch CHANGES so it exists. -open(CHANGES, ">>CHANGES") and close CHANGES; +use 5.001; -WriteMakefile( - NAME => 'CDDB', - AUTHOR => 'Rocco Caputo ', - ABSTRACT => 'High-level interface to CDDB and freedb servers.', - LICENSE => 'perl', - VERSION_FROM => 'lib/CDDB.pm', - PREREQ_PM => { - 'Test::More' => 0, - }, - META_ADD => { - resources => { - license => 'http://dev.perl.org/licenses/', - repository => 'http://github.com/rcaputo/cddb-perl' - }, - }, - dist => { - COMPRESS => 'gzip -9', - SUFFIX => 'gz', - PREOP => ( - 'git-log.pl | tee ./$(DISTNAME)-$(VERSION)/CHANGES > ./CHANGES' - ), - }, +use ExtUtils::MakeMaker 6.30; + + + +my %WriteMakefileArgs = ( + "ABSTRACT" => "a high-level interface to cddb protocol servers (freedb and CDDB)", + "AUTHOR" => "Rocco Caputo ", + "BUILD_REQUIRES" => {}, + "CONFIGURE_REQUIRES" => { + "ExtUtils::MakeMaker" => "6.30" + }, + "DISTNAME" => "CDDB", + "EXE_FILES" => [], + "LICENSE" => "perl", + "NAME" => "CDDB", + "PREREQ_PM" => { + "Carp" => "1.26", + "Encode" => "2.51", + "HTTP::Request" => "6.00", + "IO::Socket" => "1.31", + "LWP" => "6.05", + "MIME::QuotedPrint" => "3.13", + "Mail::Header" => "2.04", + "Mail::Internet" => "2.04", + "Sys::Hostname" => "1.11", + "strict" => 0, + "vars" => 0 + }, + "TEST_REQUIRES" => { + "Scalar::Util" => "1.29", + "Test::More" => "0.98", + "warnings" => 0 + }, + "VERSION" => "1.222", + "test" => { + "TESTS" => "t/*.t" + } ); + + +unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { + my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; + my $br = $WriteMakefileArgs{BUILD_REQUIRES}; + for my $mod ( keys %$tr ) { + if ( exists $br->{$mod} ) { + $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; + } + else { + $br->{$mod} = $tr->{$mod}; + } + } +} + +unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { + my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; + my $pp = $WriteMakefileArgs{PREREQ_PM}; + for my $mod ( keys %$br ) { + if ( exists $pp->{$mod} ) { + $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; + } + else { + $pp->{$mod} = $br->{$mod}; + } + } +} + +delete $WriteMakefileArgs{CONFIGURE_REQUIRES} + unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; + +WriteMakefile(%WriteMakefileArgs); + + + diff -Nru libcddb-perl-1.220/README libcddb-perl-1.222/README --- libcddb-perl-1.220/README 2010-03-08 06:05:35.000000000 +0000 +++ libcddb-perl-1.222/README 2013-08-15 07:12:57.000000000 +0000 @@ -1,72 +1,571 @@ -$Id$ +NAME + CDDB.pm - a high-level interface to cddb protocol servers (freedb and + CDDB) + +VERSION + version 1.222 + +SYNOPSIS + use CDDB; + + ### Connect to the cddbp server. + my $cddbp = new CDDB( + Host => 'freedb.freedb.org', # default + Port => 8880, # default + Login => $login_id, # defaults to %ENV's + ) or die $!; + + ### Retrieve known genres. + my @genres = $cddbp->get_genres(); + + ### Calculate cddbp ID based on MSF info. + my @toc = ( + '1 0 2 37', # track, CD-i MSF (space-delimited) + '999 1 38 17', # lead-out track MSF + '1000 0 0 Error!', # error track (don't include if ok) + ); + my ( + $cddbp_id, # used for further cddbp queries + $track_numbers, # padded with 0's (for convenience) + $track_lengths, # length of each track, in MM:SS format + $track_offsets, # absolute offsets (used for further cddbp queries) + $total_seconds # total play time, in seconds (for cddbp queries) + ) = $cddbp->calculate_id(@toc); + + ### Query discs based on cddbp ID and other information. + my @discs = $cddbp->get_discs($cddbp_id, $track_offsets, $total_seconds); + foreach my $disc (@discs) { + my ($genre, $cddbp_id, $title) = @$disc; + } + + ### Query disc details (usually done with get_discs() information). + my $disc_info = $cddbp->get_disc_details($genre, $cddbp_id); + my $disc_time = $disc_info->{'disc length'}; + my $disc_id = $disc_info->{discid}; + my $disc_title = $disc_info->{dtitle}; + my @track_offsets = @{$disc_info->{offsets}}; + my @track_seconds = @{$disc_info->{seconds}}; + my @track_titles = @{$disc_info->{ttitles}}; + # other information may be returned... explore! + + ### Submit a disc via e-mail. (Requires MailTools) + + die "can't submit a disc (no mail modules; see README)" + unless $cddbp->can_submit_disc(); + + # These are useful for prompting the user to fix defaults: + print "I will send mail through: ", $cddbp->get_mail_host(), "\n"; + print "I assume your e-mail address is: ", $cddbp->get_mail_address(), "\n"; + + # Actually submit a disc record. + $cddbp->submit_disc( + Genre => 'classical', + Id => 'b811a20c', + Artist => 'Various', + DiscTitle => 'Cartoon Classics', + Offsets => $disc_info->{offsets}, # array reference + TrackTitles => $disc_info->{ttitles}, # array reference + From => 'login@host.domain.etc', # will try to determine + ); + +DESCRIPTION + CDDB protocol (cddbp) servers provide compact disc information for + programs that need it. This allows such programs to display disc and + track titles automatically, and it provides extended information like + liner notes and lyrics. + + This module provides a high-level Perl interface to cddbp servers. With + it, a Perl program can identify and possibly gather details about a CD + based on its "table of contents" (the disc's track times and offsets). + + Disc details have been useful for generating CD catalogs, naming mp3 + files, printing CD liners, or even just playing discs in an automated + jukebox. + + Despite the module's name, it connects to FreeDB servers by default. + This began at version 1.04, when cddb.com changed its licensing model to + support end-user applications, not third-party libraries. Connections to + cddb.com may still work, and patches are welcome to maintain that + functionality, but it's no longer officially supported. + +PUBLIC METHODS + new PARAMETERS + Creates a high-level interface to a cddbp server, returning a handle + to it. The handle is not a filehandle. It is an object. The new() + constructor provides defaults for just about everything, but + everything is overrideable if the defaults aren't appropriate. + + The interface will not actually connect to a cddbp server until it's + used, and a single cddbp interface may actually make several + connections (to possibly several servers) over the course of its + use. + + The new() constructor accepts several parameters, all of which have + reasonable defaults. + + Host and Port describe the cddbp server to connect to. These default + to 'freedb.freedb.org' and 8880, which is a multiplexor for all the + other freedb servers. + + Utf8 is a boolean flag. If true, utf-8 will be used when submitting + CD info, and for interpreting the data reveived. This requires the + Encode module (and probably perl version at least 5.8.0). The + default is true if the Encode module can be loaded. Otherwise, it + will be false, meaning we fall back to ASCII. + + Protocol_Version sets the cddbp version to use. CDDB.pm will not + connect to servers that don't support the version specified here. + The requested protocol version defaults to 1 if Utf8 is off, and to + 6 if it is on. + + Login is the login ID you want to advertise to the cddbp server. It + defaults to the login ID your computer assigns you, if that can be + determined. The default login ID is determined by the presence of a + LOGNAME or USER environment variable, or by the getpwuid() function. + On Windows systems, it defaults to "win32usr" if no default method + can be found and no Login parameter is set. + + Submit_Address is the e-mail address where new disc submissions go. + This defaults to 'freedb-submit@freedb.org'. Note, that testing + submissions should be done via "test-submit@freedb.org". + + Client_Name and Client_Version describe the client software used to + connect to the cddbp server. They default to 'CDDB.pm' and CDDB.pm's + version number. If developers change this, please consult freedb's + web site for a list of client names already in use. + + Debug enables verbose operational information on STDERR when set to + true. It's normally not needed, but it can help explain why a + program is failing. If someone finds a reproduceable bug, the Debug + output and a test program would be a big help towards having it + fixed. In case of submission, if this flag is on, a copy of the + submission e-mail will be sent to the *From* address. + + get_genres + Takes no parameters. Returns a list of genres known by the cddbp + server, or undef if there is a problem retrieving them. + + calculate_id TOC + The cddb protocol defines an ID as a hash of track lengths and the + number of tracks, with an added checksum. The most basic information + required to calculate this is the CD table of contents (the CD-i + track offsets, in "MSF" [Minutes, Seconds, Frames] format). + + Note however that there is no standard way to acquire this + information from a CD-ROM device. Therefore this module does not try + to read the TOC itself. Instead, developers must combine CDDB.pm + with a CD library which works with their system. The AudioCD suite + of modules is recommended: it has system specific code for MacOS, + Linux and FreeBSD. CDDB.pm's author has used external programs like + dagrab to fetch the offsets. Actual CDs aren't always necessary: the + author has heard of people generating TOC information from mp3 file + lengths. + + That said, see parse_cdinfo() for a routine to parse "cdinfo" output + into a table of contents list suitable for calculate_id(). + + calculate_id() accepts TOC information as a list of strings. Each + string contains four fields, separated by whitespace: + + offset 0: the track number + + Track numbers start with 1 and run sequentially through the number + of tracks on a disc. Note: data tracks count on hybrid audio/data + CDs. + + CDDB.pm understands two special track numbers. Track 999 holds the + lead-out information, which is required by the cddb protocol. Track + 1000 holds information about errors which have occurred while + physically reading the disc. + + offset 1: the track start time, minutes field + + Tracks are often addressed on audio CDs using "MSF" offsets. This + stands for Minutes, Seconds, and Frames (fractions of a second). The + combination pinpoints the exact disc frame where a song starts. + + Field 1 contains the M part of MSF. It is ignored for error tracks, + but it still must contain a number. Zero is suggested. + + offset 2: the track start time, seconds field + + This field contains the S part of MSF. It is ignored for error + tracks, but it still must contain a number. Zero is suggested. + + offset 3: the track start time, frames field + + This field contains the F part of MSF. For error tracks, it contains + a description of the error. + + Example track file. Note: the comments should not appear in the + file. + + 1 0 2 37 # track 1 starts at 00:02 and 37 frames + 2 1 38 17 # track 2 starts at 01:38 and 17 frames + 3 11 57 30 # track 3 starts at 11:57 and 30 frames + ... + 999 75 16 5 # leadout starts at 75:16 and 5 frames + + Track 1000 should not be present if everything is okay: + + 1000 0 0 Error reading TOC: no disc in drive + + In scalar context, calculate_id() returns just the cddbp ID. In a + list context, it returns an array containing the following values: + + ( + $cddbp_id, + $track_numbers, + $track_lengths, + $track_offsets, + $total_seconds + ) = $cddbp->calculate_id(@toc); + + print( + "cddbp ID = $cddbp_id\n", # b811a20c + "track numbers = @$track_numbers\n", # 001 002 003 ... + "track lengths = @$track_lengths\n", # 01:36 10:19 04:29 ... + "track offsets = @$track_offsets\n", # 187 7367 53805 ... + "total seconds = $total_seconds\n", # 4514 + ); + + CDDBP_ID + + The 0th returned value is the hashed cddbp ID, required for any + queries or submissions involving this disc. + + TRACK_NUMBERS + + The 1st returned value is a reference to a list of track numbers, + one for each track (excluding the lead-out), padded to three + characters with leading zeroes. These values are provided for + convenience, but they are not required by cddbp servers. + + TRACK_LENGTHS + + The 2nd returned value is a reference to a list of track lengths, + one for each track (excluding the lead-out), in HH:MM format. These + values are returned as a convenience. They are not required by cddbp + servers. + + TRACK_OFFSETS + + The 3rd returned value is a reference to a list of absolute track + offsets, in frames. They are calculated from the MSF values, and + they are required by get_discs() and submit_disc(). + + TOTAL_SECONDS + + The 4th and final value is the total playing time for the CD, in + seconds. The get_discs() function needs it. + + get_discs CDDBP_ID, TRACK_OFFSETS, TOTAL_SECONDS + get_discs() asks the cddbp server for a summary of all the CDs + matching a given cddbp ID, track offsets, and total playing time. + These values can be retrieved from calculade_id(). + + my @id_info = $cddbp->calculate_id(@toc); + my $cddbp_id = $id_info->[0]; + my $track_offsets = $id_info->[3]; + my $total_seconds = $id_info->[4]; + + get_discs() returns an array of matching discs, each of which is + represented by an array reference. It returns an empty array if the + query succeeded but did not match, and it returns undef on error. + + my @discs = $cddbp->get_discs( $cddbp_id, $track_offsets, $total_seconds ); + foreach my $disc (@discs) { + my ($disc_genre, $disc_id, $disc_title) = @$disc; + print( + "disc id = $disc_id\n", + "disc genre = $disc_genre\n", + "disc title = $disc_title\n", + ); + } + + DISC_GENRE is the genre this disc falls into, as determined by + whoever submitted or last edited the disc. The genre is required + when requesting a disc's details. See get_genres() for how to + retrieve a list of cddbp genres. + + CDDBP_ID is the cddbp ID of this disc. Cddbp servers perform fuzzy + matches, returning near misses as well as direct hits on a cddbp ID, + so knowing the exact ID for a disc is important when submitting + changes or requesting a particular near-miss' details. + + DISC_TITLE is the disc's title, which may help a human to pick the + correct disc out of several close mathches. + + get_discs_by_toc TOC + This function acts as a macro, combining calculate_id() and + get_discs() calls into one function. It takes the same parameters as + calculate_id(), and it returns the same information as get_discs(). + + get_discs_by_query QUERY_STRING + Fetch discs by a pre-built cddbp query string. Some disc querying + programs report this string, and get_discs_by_query() is a + convenient way to use that. + + Cddb protocol query strings look like: + + cddb query $cddbp_id $track_count @offsets $total_seconds + + get_disc_details DISC_GENRE, CDDBP_ID + This function fetches a disc's detailed information from a cddbp + server. It takes two parameters: the DISC_GENRE and the CDDP_ID. + These parameters usually come from a call to get_discs(). + + The disc's details are returned in a reference to a fairly complex + hash. It includes information normally stored in comments. The most + common entries in this hash include: + + $disc_details = get_disc_details( $disc_genre, $cddbp_id ); + + $disc_details->{"disc length"} + + The disc length is commonly stored in the form "### seconds", where + ### is the disc's total playing time in seconds. It may hold other + time formats. + + $disc_details->{discid} + + This is a rehash (get it?) of the cddbp ID. It should match the + CDDBP_ID given to get_disc_details(). + + $disc_details->{dtitle} + + This is the disc's title. I do not know whether it will match the + one returned by get_discs(). + + $disc_details->{offsets} + + This is a reference to a list of absolute disc track offsets, + similar to the TRACK_OFFSETS returned by calculate_id(). + + $disc_details->{seconds} + + This is a reference to a list of track length, in seconds. + + $disc_details->{ttitles} + + This is a reference to a list of track titles. These are the droids + you are looking for. + + $disc_details->{"processed by"} + + This is a comment field identifying the name and version of the + cddbp server which accepted and entered the disc record into the + database. + + $disc_details->{revision} + + This is the disc record's version number, used as a sanity check + (semaphore?) to prevent simultaneous revisions. Revisions start at 0 + for new submissions and are incremented for every correction. It is + the responsibility of the submitter (be it a person or a program + using CDDB.pm) to provide a correct revision number. + + $disc_details->{"submitted via"} + + This is the name and version of the software that submitted this + cddbp record. The main intention is to identify records that are + submitted by broken software so they can be purged or corrected. + + $disc_details->{xmcd_record} + + The xmcd_record field contains a copy of the entire unprocessed + cddbp response that generated all the other fields. + + $disc_details->{genre} + + This is merely a copy of DISC_GENRE, since it's otherwise not + possible to determine it from the hash. + + parse_xmcd_file XMCD_FILE_CONTENTS, [GENRE] + Parses an array ref of lines read from an XMCD file into the + disc_details hash described above. If the GENRE parameter is set it + will be included in disc_details. + + can_submit_disc + Returns true or false, depending on whether CDDB.pm has enough + dependent modules to submit discs. If it returns false, you are + missing Mail::Internet, Mail::Header, or MIME::QuotedPrint. + + get_mail_address + Returns what CDDB.pm thinks your e-mail address is, or what it was + last set to. It was added to fetch the default e-mail address so + users can see it and have an opportunity to correct it. + + my $mail_from = $cddb->get_mail_address(); + print "New e-mail address (or blank to keep <$mail_from>): "; + my $new_mail_from = ; + $new_mail_from =~ s/^\s+//; + $new_mail_from =~ s/\s+$//; + $new_mail_from =~ s/\s+/ /g; + $mail_from = $new_mail_from if length $new_mail_from; + + $cddbp->submit_disc( + ..., + From => $mail_from, + ); + + get_mail_host + Returns what CDDB.pm thinks your SMTP host is, or what it was last + set to. It was added to fetch the default e-mail transfer host so + users can see it and have an opportunity to correct it. + + my $mail_host = $cddb->get_mail_host(); + print "New e-mail host (or blank to keep <$mail_host>): "; + my $new_mail_host = ; + $new_mail_host =~ s/^\s+//; + $new_mail_host =~ s/\s+$//; + $new_mail_host =~ s/\s+/ /g; + $mail_host = $new_mail_host if length $new_mail_host; + + $cddbp->submit_disc( + ..., + Host => $mail_host, + ); + + parse_cdinfo CDINFO_FILE + Generates a table of contents suitable for calculate_id() based on + the output of a program called "cdinfo". CDINFO_FILE may either be a + text file, or it may be the cdinfo program itself. + + my @toc = parse_cdinfo("cdinfo.txt"); # read cdinfo.txt + my @toc = parse_cdinfo("cdinfo|"); # run cdinfo directly + + The table of contents can be passed directly to calculate_id(). + + submit_disc DISC_DETAILS + submit_disc() submits a disc record to a cddbp server. Currently it + only uses e-mail, although it will try different ways to send that. + It returns true or false depending on whether it was able to send + the submission e-mail. + + The rest of CDDB.pm will work without the ability to submit discs. + While cddbp submissions are relatively rare, most CD collections + will have one or two discs not present in the system. Please submit + new discs to the system: the amazing number of existing discs got + there because others submitted them before you needed them. + + submit_disc() takes six required parameters and two optional ones. + The parameters are named, like hash elements, and can appear in any + order. + + Genre => DISC_GENRE + + This is the disc's genre. It must be one of the genres that the + server knows. See get_genres(). + + Id => CDDBP_ID + + This is the cddbp ID that identifies the disc. It should come from + calculate_id() if this is a new submission, or from + get_disc_details() if this is a revision. + + Artist => DISC_ARTIST + + This is the disc's artist, a freeform text field describing the + party responsible for the album. It will need to be entered from the + disc's notes for new submissions, or it can come from + get_disc_details() on subsequent revisions. + + DiscTitle => DISC_TITLE + + This is the disc's title, a freeform text field describing the + album. It must be entered from the disc's notes for new submissions. + It can come from get_disc_details() on subsequent revisions. + + Offsets => TRACK_OFFSETS + + This is a reference to an array of absolute track offsets, as + provided by calculate_id(). + + TrackTitles => TRACK_TITLES + + This is a reference to an array of track titles, either entered by a + human or provided by get_disc_details(). + + From => EMAIL_ADDRESS + + This is the disc submitter's e-mail address. It's not required, and + CDDB.pm will try to figure one out on its own if an address is + omitted. It may be more reliable to provide your own, however. + + The default return address may not be a deliverable one, especially + if CDDB.pm is being used on a dial-up machine that isn't running its + own MTA. If the current machine has its own MTA, problems still may + occur if the machine's Internet address changes. + + Host => SMTP_HOST + + This is the SMTP host to contact when sending mail. It's not + required, and CDDB.pm will try to figure one out on its own. It will + look at the SMTPHOSTS environment variable is not defined, it will + try 'mail' and 'localhost' before finally failing. + + Revision => REVISION + + The revision number. Should be 1 for new submissions, and one higher + than the previous one for updates. The previous revision number is + available as the "revision" field in the hash returned by + get_disc_details(). + +PRIVATE METHODS + Documented as being not documented. + +EXAMPLES + Please see the cddb.t program in the t (tests) directory. It exercises + every aspect of CDDB.pm, including submissions. ------ -ABOUT ------ - -CDDB is a high-level interface to databases based on the Compact Disc -Database protocol. - -Starting in version 1.04, CDDB.pm will contact freedb.org servers by -default. This change is in response to Gracenote denying CDDB.pm -connections and failing to answer my e-mail. - -cddb.com's developer license is for end-user applications; not -third-party libraries. This makes CDDB.pm ineligible for access to -cddb.com servers. This author will not pursue further cddb.com -access. - -Developers using CDDB.pm may continue to attempt connections to -cddb.com servers, but there are no guarantees it will work. - -------------- COMPATIBILITY -------------- - -CDDB.pm uses standard Perl modules. It has been tested on OS/2, MacOS -and FreeBSD systems, as well as the systems listed at: - - http://testers.cpan.org/search?request=dist&dist=CDDB - -If you want to submit disc information to the CDDB, you will need to -install two other modules: - - Mail::Internet will allow CDDB.pm to send email submissions, and it - automagically includes Mail::Header. - - MIME::QuotedPrint will allow CDDB.pm to send non-ASCII text - unscathed. Currently only ISO-8859-1 and ASCII are supported. - -All other features will work without these modules. - ---------------- -GETTING STARTED ---------------- - -To build and test this distribution, type: - - perl Makefile.PL - make test - -The final test will try to send a sample submission to the CDDB if -MailTools is present. It expects to find an SMTP host in the SMTPHOST -environment variable. It will fall back to "mail" if SMTPHOST doesn't -exist. If neither works, the test will be skipped. To see why it's -skipped: - - make test TEST_VERBOSE=1 - -Some of the tests (most notably numbers 25, 27 and 29) compare data -returned by a cddbp server against a stored copy of a previous query. -These tests fail occasionally since the database is constantly in -flux. Starting with version 1.00, the test program uses fuzzy -comparisons that should fail less. Version 1.04 saw even fuzzier -comparisons. Please let me know if there are any problems. - -If you're satisfied with the test results: - - make install - -Thanks for reading! + CDDB.pm uses standard Perl modules. It has been tested at one point or + another on OS/2, MacOS and FreeBSD systems, as well as the systems + listed at: + + http://testers.cpan.org/search?request=dist&dist=CDDB + + If you want to submit disc information to the CDDB, you will need to + install two other modules: + + Mail::Internet will allow CDDB.pm to send email submissions, and it + automagically includes Mail::Header. + + MIME::QuotedPrint will allow CDDB.pm to send non-ASCII text + unscathed. Currently only ISO-8859-1 and ASCII are supported. + + All other features will work without these modules. + +KNOWN TEST FAILURES + The last test in the "make test" suite will try to send a sample + submission to the CDDB if MailTools is present. It expects to find an + SMTP host in the SMTPHOST environment variable. It will fall back to + "mail" if SMTPHOST doesn't exist. If neither works, the test will be + skipped. To see why it's skipped: + + make test TEST_VERBOSE=1 + + Some of the tests (most notably numbers 25, 27 and 29) compare data + returned by a cddbp server against a stored copy of a previous query. + These tests fail occasionally since the database is constantly in flux. + Starting with version 1.00, the test program uses fuzzy comparisons that + should fail less. Version 1.04 saw even fuzzier comparisons. Please + report any problems so they can be fixed. + +LINKS + BUG TRACKER + https://rt.cpan.org/Dist/Display.html?Status=Active&Queue=CDDB + + REPOSITORY + http://github.com/rcaputo/cddb-perl + http://gitorious.org/cddb-freedb-perl + + OTHER RESOURCES + http://search.cpan.org/dist/CDDB/ + +CONTACT AND COPYRIGHT + Copyright 1998-2013 Rocco Caputo. All rights reserved. This program is + free software; you can redistribute it and/or modify it under the same + terms as Perl itself. --- Rocco Caputo / rcaputo@cpan.org diff -Nru libcddb-perl-1.220/README.mkdn libcddb-perl-1.222/README.mkdn --- libcddb-perl-1.220/README.mkdn 1970-01-01 00:00:00.000000000 +0000 +++ libcddb-perl-1.222/README.mkdn 2013-08-15 07:12:57.000000000 +0000 @@ -0,0 +1,592 @@ +# NAME + +CDDB.pm - a high-level interface to cddb protocol servers (freedb and CDDB) + +# VERSION + +version 1.222 + +# SYNOPSIS + + use CDDB; + + ### Connect to the cddbp server. + my $cddbp = new CDDB( + Host => 'freedb.freedb.org', # default + Port => 8880, # default + Login => $login_id, # defaults to %ENV's + ) or die $!; + + ### Retrieve known genres. + my @genres = $cddbp->get_genres(); + + ### Calculate cddbp ID based on MSF info. + my @toc = ( + '1 0 2 37', # track, CD-i MSF (space-delimited) + '999 1 38 17', # lead-out track MSF + '1000 0 0 Error!', # error track (don't include if ok) + ); + my ( + $cddbp_id, # used for further cddbp queries + $track_numbers, # padded with 0's (for convenience) + $track_lengths, # length of each track, in MM:SS format + $track_offsets, # absolute offsets (used for further cddbp queries) + $total_seconds # total play time, in seconds (for cddbp queries) + ) = $cddbp->calculate_id(@toc); + + ### Query discs based on cddbp ID and other information. + my @discs = $cddbp->get_discs($cddbp_id, $track_offsets, $total_seconds); + foreach my $disc (@discs) { + my ($genre, $cddbp_id, $title) = @$disc; + } + + ### Query disc details (usually done with get_discs() information). + my $disc_info = $cddbp->get_disc_details($genre, $cddbp_id); + my $disc_time = $disc_info->{'disc length'}; + my $disc_id = $disc_info->{discid}; + my $disc_title = $disc_info->{dtitle}; + my @track_offsets = @{$disc_info->{offsets}}; + my @track_seconds = @{$disc_info->{seconds}}; + my @track_titles = @{$disc_info->{ttitles}}; + # other information may be returned... explore! + + ### Submit a disc via e-mail. (Requires MailTools) + + die "can't submit a disc (no mail modules; see README)" + unless $cddbp->can_submit_disc(); + + # These are useful for prompting the user to fix defaults: + print "I will send mail through: ", $cddbp->get_mail_host(), "\n"; + print "I assume your e-mail address is: ", $cddbp->get_mail_address(), "\n"; + + # Actually submit a disc record. + $cddbp->submit_disc( + Genre => 'classical', + Id => 'b811a20c', + Artist => 'Various', + DiscTitle => 'Cartoon Classics', + Offsets => $disc_info->{offsets}, # array reference + TrackTitles => $disc_info->{ttitles}, # array reference + From => 'login@host.domain.etc', # will try to determine + ); + +# DESCRIPTION + +CDDB protocol (cddbp) servers provide compact disc information for +programs that need it. This allows such programs to display disc and +track titles automatically, and it provides extended information like +liner notes and lyrics. + +This module provides a high-level Perl interface to cddbp servers. +With it, a Perl program can identify and possibly gather details about +a CD based on its "table of contents" (the disc's track times and +offsets). + +Disc details have been useful for generating CD catalogs, naming mp3 +files, printing CD liners, or even just playing discs in an automated +jukebox. + +Despite the module's name, it connects to FreeDB servers by default. +This began at version 1.04, when cddb.com changed its licensing model +to support end-user applications, not third-party libraries. +Connections to cddb.com may still work, and patches are welcome to +maintain that functionality, but it's no longer officially supported. + +# PUBLIC METHODS + +- new PARAMETERS + + Creates a high-level interface to a cddbp server, returning a handle + to it. The handle is not a filehandle. It is an object. The new() + constructor provides defaults for just about everything, but + everything is overrideable if the defaults aren't appropriate. + + The interface will not actually connect to a cddbp server until it's + used, and a single cddbp interface may actually make several + connections (to possibly several servers) over the course of its use. + + The new() constructor accepts several parameters, all of which have + reasonable defaults. + + __Host__ and __Port__ describe the cddbp server to connect to. These + default to 'freedb.freedb.org' and 8880, which is a multiplexor for + all the other freedb servers. + + __Utf8__ is a boolean flag. If true, utf-8 will be used when submitting + CD info, and for interpreting the data reveived. This requires the + [Encode](http://search.cpan.org/perldoc?Encode) module (and probably perl version at least 5.8.0). The + default is true if the [Encode](http://search.cpan.org/perldoc?Encode) module can be loaded. Otherwise, it + will be false, meaning we fall back to ASCII. + + __Protocol\_Version__ sets the cddbp version to use. CDDB.pm will not + connect to servers that don't support the version specified here. The + requested protocol version defaults to 1 if __Utf8__ is off, and to 6 + if it is on. + + __Login__ is the login ID you want to advertise to the cddbp server. + It defaults to the login ID your computer assigns you, if that can be + determined. The default login ID is determined by the presence of a + LOGNAME or USER environment variable, or by the getpwuid() function. + On Windows systems, it defaults to "win32usr" if no default method can + be found and no Login parameter is set. + + __Submit\_Address__ is the e-mail address where new disc submissions go. + This defaults to 'freedb-submit@freedb.org'. Note, that testing + submissions should be done via `test-submit@freedb.org`. + + __Client\_Name__ and __Client\_Version__ describe the client software used + to connect to the cddbp server. They default to 'CDDB.pm' and + CDDB.pm's version number. If developers change this, please consult + freedb's web site for a list of client names already in use. + + __Debug__ enables verbose operational information on STDERR when set to + true. It's normally not needed, but it can help explain why a program + is failing. If someone finds a reproduceable bug, the Debug output + and a test program would be a big help towards having it fixed. In + case of submission, if this flag is on, a copy of the submission + e-mail will be sent to the _From_ address. + +- get\_genres + + Takes no parameters. Returns a list of genres known by the cddbp + server, or undef if there is a problem retrieving them. + +- calculate\_id TOC + + The cddb protocol defines an ID as a hash of track lengths and the + number of tracks, with an added checksum. The most basic information + required to calculate this is the CD table of contents (the CD-i track + offsets, in "MSF" \[Minutes, Seconds, Frames\] format). + + Note however that there is no standard way to acquire this information + from a CD-ROM device. Therefore this module does not try to read the + TOC itself. Instead, developers must combine CDDB.pm with a CD + library which works with their system. The AudioCD suite of modules + is recommended: it has system specific code for MacOS, Linux and + FreeBSD. CDDB.pm's author has used external programs like dagrab to + fetch the offsets. Actual CDs aren't always necessary: the author has + heard of people generating TOC information from mp3 file lengths. + + That said, see parse\_cdinfo() for a routine to parse "cdinfo" output + into a table of contents list suitable for calculate\_id(). + + calculate\_id() accepts TOC information as a list of strings. Each + string contains four fields, separated by whitespace: + + offset 0: the track number + + Track numbers start with 1 and run sequentially through the number of + tracks on a disc. Note: data tracks count on hybrid audio/data CDs. + + CDDB.pm understands two special track numbers. Track 999 holds the + lead-out information, which is required by the cddb protocol. Track + 1000 holds information about errors which have occurred while + physically reading the disc. + + offset 1: the track start time, minutes field + + Tracks are often addressed on audio CDs using "MSF" offsets. This + stands for Minutes, Seconds, and Frames (fractions of a second). The + combination pinpoints the exact disc frame where a song starts. + + Field 1 contains the M part of MSF. It is ignored for error tracks, + but it still must contain a number. Zero is suggested. + + offset 2: the track start time, seconds field + + This field contains the S part of MSF. It is ignored for error + tracks, but it still must contain a number. Zero is suggested. + + offset 3: the track start time, frames field + + This field contains the F part of MSF. For error tracks, it contains + a description of the error. + + Example track file. Note: the comments should not appear in the file. + + 1 0 2 37 # track 1 starts at 00:02 and 37 frames + 2 1 38 17 # track 2 starts at 01:38 and 17 frames + 3 11 57 30 # track 3 starts at 11:57 and 30 frames + ... + 999 75 16 5 # leadout starts at 75:16 and 5 frames + + Track 1000 should not be present if everything is okay: + + 1000 0 0 Error reading TOC: no disc in drive + + In scalar context, calculate\_id() returns just the cddbp ID. In a + list context, it returns an array containing the following values: + + ( + $cddbp_id, + $track_numbers, + $track_lengths, + $track_offsets, + $total_seconds + ) = $cddbp->calculate_id(@toc); + + print( + "cddbp ID = $cddbp_id\n", # b811a20c + "track numbers = @$track_numbers\n", # 001 002 003 ... + "track lengths = @$track_lengths\n", # 01:36 10:19 04:29 ... + "track offsets = @$track_offsets\n", # 187 7367 53805 ... + "total seconds = $total_seconds\n", # 4514 + ); + + CDDBP\_ID + + The 0th returned value is the hashed cddbp ID, required for any + queries or submissions involving this disc. + + TRACK\_NUMBERS + + The 1st returned value is a reference to a list of track numbers, one + for each track (excluding the lead-out), padded to three characters + with leading zeroes. These values are provided for convenience, but + they are not required by cddbp servers. + + TRACK\_LENGTHS + + The 2nd returned value is a reference to a list of track lengths, one + for each track (excluding the lead-out), in HH:MM format. These + values are returned as a convenience. They are not required by cddbp + servers. + + TRACK\_OFFSETS + + The 3rd returned value is a reference to a list of absolute track + offsets, in frames. They are calculated from the MSF values, and they + are required by get\_discs() and submit\_disc(). + + TOTAL\_SECONDS + + The 4th and final value is the total playing time for the CD, in + seconds. The get\_discs() function needs it. + +- get\_discs CDDBP\_ID, TRACK\_OFFSETS, TOTAL\_SECONDS + + get\_discs() asks the cddbp server for a summary of all the CDs + matching a given cddbp ID, track offsets, and total playing time. + These values can be retrieved from calculade\_id(). + + my @id_info = $cddbp->calculate_id(@toc); + my $cddbp_id = $id_info->[0]; + my $track_offsets = $id_info->[3]; + my $total_seconds = $id_info->[4]; + + get\_discs() returns an array of matching discs, each of which is + represented by an array reference. It returns an empty array if the + query succeeded but did not match, and it returns undef on error. + + my @discs = $cddbp->get_discs( $cddbp_id, $track_offsets, $total_seconds ); + foreach my $disc (@discs) { + my ($disc_genre, $disc_id, $disc_title) = @$disc; + print( + "disc id = $disc_id\n", + "disc genre = $disc_genre\n", + "disc title = $disc_title\n", + ); + } + + DISC\_GENRE is the genre this disc falls into, as determined by whoever + submitted or last edited the disc. The genre is required when + requesting a disc's details. See get\_genres() for how to retrieve a + list of cddbp genres. + + CDDBP\_ID is the cddbp ID of this disc. Cddbp servers perform fuzzy + matches, returning near misses as well as direct hits on a cddbp ID, + so knowing the exact ID for a disc is important when submitting + changes or requesting a particular near-miss' details. + + DISC\_TITLE is the disc's title, which may help a human to pick the + correct disc out of several close mathches. + +- get\_discs\_by\_toc TOC + + This function acts as a macro, combining calculate\_id() and + get\_discs() calls into one function. It takes the same parameters as + calculate\_id(), and it returns the same information as get\_discs(). + +- get\_discs\_by\_query QUERY\_STRING + + Fetch discs by a pre-built cddbp query string. Some disc querying + programs report this string, and get\_discs\_by\_query() is a convenient + way to use that. + + Cddb protocol query strings look like: + + cddb query $cddbp_id $track_count @offsets $total_seconds + +- get\_disc\_details DISC\_GENRE, CDDBP\_ID + + This function fetches a disc's detailed information from a cddbp + server. It takes two parameters: the DISC\_GENRE and the CDDP\_ID. + These parameters usually come from a call to get\_discs(). + + The disc's details are returned in a reference to a fairly complex + hash. It includes information normally stored in comments. The most + common entries in this hash include: + + $disc_details = get_disc_details( $disc_genre, $cddbp_id ); + + $disc\_details->{"disc length"} + + The disc length is commonly stored in the form "\#\#\# seconds", where + \#\#\# is the disc's total playing time in seconds. It may hold other + time formats. + + $disc\_details->{discid} + + This is a rehash (get it?) of the cddbp ID. It should match the + CDDBP\_ID given to get\_disc\_details(). + + $disc\_details->{dtitle} + + This is the disc's title. I do not know whether it will match the one + returned by get\_discs(). + + $disc\_details->{offsets} + + This is a reference to a list of absolute disc track offsets, similar + to the TRACK\_OFFSETS returned by calculate\_id(). + + $disc\_details->{seconds} + + This is a reference to a list of track length, in seconds. + + $disc\_details->{ttitles} + + This is a reference to a list of track titles. These are the droids + you are looking for. + + $disc\_details->{"processed by"} + + This is a comment field identifying the name and version of the cddbp + server which accepted and entered the disc record into the database. + + $disc\_details->{revision} + + This is the disc record's version number, used as a sanity check + (semaphore?) to prevent simultaneous revisions. Revisions start at 0 + for new submissions and are incremented for every correction. It is + the responsibility of the submitter (be it a person or a program using + CDDB.pm) to provide a correct revision number. + + $disc\_details->{"submitted via"} + + This is the name and version of the software that submitted this cddbp + record. The main intention is to identify records that are submitted + by broken software so they can be purged or corrected. + + $disc\_details->{xmcd\_record} + + The xmcd\_record field contains a copy of the entire unprocessed cddbp + response that generated all the other fields. + + $disc\_details->{genre} + + This is merely a copy of DISC\_GENRE, since it's otherwise not possible + to determine it from the hash. + +- parse\_xmcd\_file XMCD\_FILE\_CONTENTS, \[GENRE\] + + Parses an array ref of lines read from an XMCD file into the + disc\_details hash described above. If the GENRE parameter is set it + will be included in disc\_details. + +- can\_submit\_disc + + Returns true or false, depending on whether CDDB.pm has enough + dependent modules to submit discs. If it returns false, you are + missing Mail::Internet, Mail::Header, or MIME::QuotedPrint. + +- get\_mail\_address + + Returns what CDDB.pm thinks your e-mail address is, or what it was + last set to. It was added to fetch the default e-mail address so + users can see it and have an opportunity to correct it. + + my $mail_from = $cddb->get_mail_address(); + print "New e-mail address (or blank to keep <$mail_from>): "; + my $new_mail_from = ; + $new_mail_from =~ s/^\s+//; + $new_mail_from =~ s/\s+$//; + $new_mail_from =~ s/\s+/ /g; + $mail_from = $new_mail_from if length $new_mail_from; + + $cddbp->submit_disc( + ..., + From => $mail_from, + ); + +- get\_mail\_host + + Returns what CDDB.pm thinks your SMTP host is, or what it was last set + to. It was added to fetch the default e-mail transfer host so users + can see it and have an opportunity to correct it. + + my $mail_host = $cddb->get_mail_host(); + print "New e-mail host (or blank to keep <$mail_host>): "; + my $new_mail_host = ; + $new_mail_host =~ s/^\s+//; + $new_mail_host =~ s/\s+$//; + $new_mail_host =~ s/\s+/ /g; + $mail_host = $new_mail_host if length $new_mail_host; + + $cddbp->submit_disc( + ..., + Host => $mail_host, + ); + +- parse\_cdinfo CDINFO\_FILE + + Generates a table of contents suitable for calculate\_id() based on the + output of a program called "cdinfo". CDINFO\_FILE may either be a text + file, or it may be the cdinfo program itself. + + my @toc = parse_cdinfo("cdinfo.txt"); # read cdinfo.txt + my @toc = parse_cdinfo("cdinfo|"); # run cdinfo directly + + The table of contents can be passed directly to calculate\_id(). + +- submit\_disc DISC\_DETAILS + + submit\_disc() submits a disc record to a cddbp server. Currently it + only uses e-mail, although it will try different ways to send that. + It returns true or false depending on whether it was able to send the + submission e-mail. + + The rest of CDDB.pm will work without the ability to submit discs. + While cddbp submissions are relatively rare, most CD collections will + have one or two discs not present in the system. Please submit new + discs to the system: the amazing number of existing discs got there + because others submitted them before you needed them. + + submit\_disc() takes six required parameters and two optional ones. + The parameters are named, like hash elements, and can appear in any + order. + + Genre => DISC\_GENRE + + This is the disc's genre. It must be one of the genres that the + server knows. See get\_genres(). + + Id => CDDBP\_ID + + This is the cddbp ID that identifies the disc. It should come from + calculate\_id() if this is a new submission, or from get\_disc\_details() + if this is a revision. + + Artist => DISC\_ARTIST + + This is the disc's artist, a freeform text field describing the party + responsible for the album. It will need to be entered from the disc's + notes for new submissions, or it can come from get\_disc\_details() on + subsequent revisions. + + DiscTitle => DISC\_TITLE + + This is the disc's title, a freeform text field describing the album. + It must be entered from the disc's notes for new submissions. It can + come from get\_disc\_details() on subsequent revisions. + + Offsets => TRACK\_OFFSETS + + This is a reference to an array of absolute track offsets, as provided + by calculate\_id(). + + TrackTitles => TRACK\_TITLES + + This is a reference to an array of track titles, either entered by a + human or provided by get\_disc\_details(). + + From => EMAIL\_ADDRESS + + This is the disc submitter's e-mail address. It's not required, and + CDDB.pm will try to figure one out on its own if an address is + omitted. It may be more reliable to provide your own, however. + + The default return address may not be a deliverable one, especially if + CDDB.pm is being used on a dial-up machine that isn't running its own + MTA. If the current machine has its own MTA, problems still may occur + if the machine's Internet address changes. + + Host => SMTP\_HOST + + This is the SMTP host to contact when sending mail. It's not + required, and CDDB.pm will try to figure one out on its own. It will + look at the SMTPHOSTS environment variable is not defined, it will try + 'mail' and 'localhost' before finally failing. + + Revision => REVISION + + The revision number. Should be 1 for new submissions, and one higher + than the previous one for updates. The previous revision number is + available as the `revision` field in the hash returned by + get\_disc\_details(). + +# PRIVATE METHODS + +Documented as being not documented. + +# EXAMPLES + +Please see the cddb.t program in the t (tests) directory. It +exercises every aspect of CDDB.pm, including submissions. + +# COMPATIBILITY + +CDDB.pm uses standard Perl modules. It has been tested at one point +or another on OS/2, MacOS and FreeBSD systems, as well as the systems +listed at: + + http://testers.cpan.org/search?request=dist&dist=CDDB + +If you want to submit disc information to the CDDB, you will need to +install two other modules: + + Mail::Internet will allow CDDB.pm to send email submissions, and it + automagically includes Mail::Header. + + MIME::QuotedPrint will allow CDDB.pm to send non-ASCII text + unscathed. Currently only ISO-8859-1 and ASCII are supported. + +All other features will work without these modules. + +# KNOWN TEST FAILURES + +The last test in the "make test" suite will try to send a sample +submission to the CDDB if MailTools is present. It expects to find an +SMTP host in the SMTPHOST environment variable. It will fall back to +"mail" if SMTPHOST doesn't exist. If neither works, the test will be +skipped. To see why it's skipped: + + make test TEST_VERBOSE=1 + +Some of the tests (most notably numbers 25, 27 and 29) compare data +returned by a cddbp server against a stored copy of a previous query. +These tests fail occasionally since the database is constantly in +flux. Starting with version 1.00, the test program uses fuzzy +comparisons that should fail less. Version 1.04 saw even fuzzier +comparisons. Please report any problems so they can be fixed. + +# LINKS + +## BUG TRACKER + +https://rt.cpan.org/Dist/Display.html?Status=Active&Queue=CDDB + +## REPOSITORY + +http://github.com/rcaputo/cddb-perl +http://gitorious.org/cddb-freedb-perl + +## OTHER RESOURCES + +http://search.cpan.org/dist/CDDB/ + +# CONTACT AND COPYRIGHT + +Copyright 1998-2013 Rocco Caputo. All rights reserved. This program +is free software; you can redistribute it and/or modify it under the +same terms as Perl itself. diff -Nru libcddb-perl-1.220/debian/changelog libcddb-perl-1.222/debian/changelog --- libcddb-perl-1.220/debian/changelog 2010-03-08 19:17:21.000000000 +0000 +++ libcddb-perl-1.222/debian/changelog 2013-09-21 20:13:26.000000000 +0000 @@ -1,3 +1,27 @@ +libcddb-perl (1.222-1) unstable; urgency=low + + * Team upload. + + [ Ansgar Burchardt ] + * debian/control: Convert Vcs-* fields to Git. + + [ Salvatore Bonaccorso ] + * Change search.cpan.org based URIs to metacpan.org based URIs + + [ Axel Beckert ] + * debian/copyright: migrate pre-1.0 format to 1.0 using "cme fix dpkg- + copyright" + + [ gregor herrmann ] + * New upstream release. + * Use debhelper 8. + * Update (build) dependencies. + * Update years of upstream copyright. + * Refresh license stanzas. + * Declare compliance with Debian Policy 3.9.4. + + -- gregor herrmann Sat, 21 Sep 2013 22:13:00 +0200 + libcddb-perl (1.220-1) unstable; urgency=low [ Jonathan Yu ] diff -Nru libcddb-perl-1.220/debian/control libcddb-perl-1.222/debian/control --- libcddb-perl-1.220/debian/control 2010-03-08 19:17:21.000000000 +0000 +++ libcddb-perl-1.222/debian/control 2013-09-21 20:13:26.000000000 +0000 @@ -1,18 +1,25 @@ Source: libcddb-perl +Maintainer: Debian Perl Group +Uploaders: Martín Ferrari , + Jonathan Yu Section: perl Priority: optional -Build-Depends: debhelper (>= 7) -Build-Depends-Indep: perl -Maintainer: Debian Perl Group -Uploaders: Martín Ferrari , Jonathan Yu -Standards-Version: 3.8.4 -Homepage: http://search.cpan.org/dist/CDDB/ -Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libcddb-perl/ -Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libcddb-perl/ +Build-Depends: debhelper (>= 8) +Build-Depends-Indep: perl, + libhttp-message-perl, + libmailtools-perl (>= 2.04), + libwww-perl (>= 6.05) +Standards-Version: 3.9.4 +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libcddb-perl.git +Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libcddb-perl.git +Homepage: https://metacpan.org/release/CDDB/ Package: libcddb-perl Architecture: all -Depends: ${perl:Depends}, ${misc:Depends} +Depends: ${misc:Depends}, + ${perl:Depends}, + libhttp-message-perl, + libwww-perl (>= 6.05) Suggests: libmailtools-perl Description: module to query CDDB and freedb servers CDDB protocol servers provide compact disc information for programs that need diff -Nru libcddb-perl-1.220/debian/copyright libcddb-perl-1.222/debian/copyright --- libcddb-perl-1.220/debian/copyright 2010-03-08 20:09:10.000000000 +0000 +++ libcddb-perl-1.222/debian/copyright 2013-09-21 20:13:26.000000000 +0000 @@ -1,23 +1,23 @@ -Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 -Maintainer: Rocco Caputo -Source: http://search.cpan.org/dist/CDDB/ -Name: CDDB +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: CDDB +Upstream-Contact: Rocco Caputo +Source: https://metacpan.org/release/CDDB/ Files: * -Copyright: 1998-2010, Rocco Caputo +Copyright: 1998-2013, Rocco Caputo License: Artistic or GPL-1+ Files: debian/* -Copyright: 2009-2010, Jonathan Yu - 2008, Martín Ferrari +Copyright: 2008, Martín Ferrari + 2009-2010, Jonathan Yu License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . - On Debian GNU/Linux systems, the complete text of the Artistic License - can be found in `/usr/share/common-licenses/Artistic' + On Debian systems, the complete text of the Artistic License can be + found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify @@ -25,6 +25,5 @@ the Free Software Foundation; either version 1, or (at your option) any later version. . - On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL' - + On Debian systems, the complete text of version 1 of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-1'. diff -Nru libcddb-perl-1.220/debian/watch libcddb-perl-1.222/debian/watch --- libcddb-perl-1.220/debian/watch 2010-03-08 19:17:21.000000000 +0000 +++ libcddb-perl-1.222/debian/watch 2013-09-21 20:13:26.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -http://search.cpan.org/dist/CDDB/ .*/CDDB-v?(\d[\d.-]+)\.tar\.gz$ +https://metacpan.org/release/CDDB/ .*/CDDB-v?(\d[\d.-]+)\.tar\.gz$ diff -Nru libcddb-perl-1.220/dist.ini libcddb-perl-1.222/dist.ini --- libcddb-perl-1.220/dist.ini 1970-01-01 00:00:00.000000000 +0000 +++ libcddb-perl-1.222/dist.ini 2013-08-15 07:12:57.000000000 +0000 @@ -0,0 +1,46 @@ +name = CDDB + +author = Rocco Caputo +copyright_holder = Rocco Caputo +license = Perl_5 + +[AutoMetaResources] +bugtracker.rt = 1 +license = http://dev.perl.org/licenses/ +repository.github = user:rcaputo;lcdist:cddb-perl + +[AutoPrereqs] +[CheckPrereqsIndexed] +[Prereqs::MatchInstalled::All] +exclude = bytes +exclude = constant +exclude = lib +exclude = perl +exclude = strict +exclude = vars +exclude = warnings + +[Homepage] + +[ReadmeFromPod] +[ReadmeMarkdownFromPod] +[ReportVersions] + +[Repository] +git_remote = gh + +[Git::Check] + +[Git::NextVersion] +first_version = 1.221 +version_regexp = ^v(\d+\.\d+)$ + +[ChangelogFromGit] +tag_regexp = v(\d+[_.]\d+) + +[Git::Tag] +tag_format = v%v +tag_message = Release %v. + +[@Classic] +[MetaJSON] diff -Nru libcddb-perl-1.220/lib/CDDB.pm libcddb-perl-1.222/lib/CDDB.pm --- libcddb-perl-1.220/lib/CDDB.pm 2010-03-08 06:17:37.000000000 +0000 +++ libcddb-perl-1.222/lib/CDDB.pm 2013-08-15 07:12:57.000000000 +0000 @@ -27,6 +27,8 @@ # TODO: Fetch the list from freedb.freedb.org, which is a round-robin # for all the others anyway. +my $cddbp_host_selector = 0; + my @cddbp_hosts = ( [ 'localhost' => 8880 ], [ 'freedb.freedb.org' => 8880 ], @@ -342,31 +344,15 @@ HANDSHAKE: while ('true') { - # The host loop tries each possible host, in order. + # Loop through the CDDB protocol hosts list up to twice in order + # to find a server that will respond. This implements a 2x retry. - HOST: while ('true') { + HOST: for (1..(@cddbp_hosts * 2)) { # Hard disconnect here to prevent recursion. delete $self->{handle}; - # If no host has been selected, cycle to the next one in the - # list. This destroys that list as it goes, but a successful - # connection later will restore the good host to the list. - # TODO: give bad hosts extra chances in case there are transient - # network problems. - if ($self->{host} eq '') { - - # None of the servers worked. Time to leave. - unless (@cddbp_hosts) { - $self->debug_print( 0, "--- all cddbp servers failed to answer" ); - warn "No cddb protocol servers answer. Is your network OK?\n" - unless $self->{debug}; - return; - } - - $cddbp_host = shift(@cddbp_hosts); - ($self->{host}, $self->{port}) = @$cddbp_host; - } + ($self->{host}, $self->{port}) = @{$cddbp_hosts[$cddbp_host_selector]}; # Assign the host we selected, and attempt a connection. $self->debug_print( @@ -387,8 +373,13 @@ 0, "--- error connecting to $self->{host} port $self->{port}: $!" ); + delete $self->{handle}; $self->{host} = $self->{port} = ''; + + # Try the next host in the list. Wrap if necessary. + $cddbp_host_selector = 0 if ++$cddbp_host_selector > @cddbp_hosts; + next HOST; } @@ -399,12 +390,17 @@ 0, "+++ successfully connected to $self->{host} port $self->{port}" ); - push(@cddbp_hosts, $cddbp_host); + last HOST; } - # This should not occur. - die unless defined $self->{handle}; + # Tried the whole list twice without success? Time to give up. + unless (defined $self->{handle}) { + $self->debug_print( 0, "--- all cddbp servers failed to answer" ); + warn "No cddb protocol servers answer. Is your network OK?\n" + unless $self->{debug}; + return; + } # Turn off buffering on the socket handle. select((select($self->{handle}), $|=1)[0]); @@ -1011,14 +1007,18 @@ return; } -############################################################################### 1; + __END__ =head1 NAME CDDB.pm - a high-level interface to cddb protocol servers (freedb and CDDB) +=head1 VERSION + +version 1.222 + =head1 SYNOPSIS use CDDB; @@ -1099,6 +1099,12 @@ files, printing CD liners, or even just playing discs in an automated jukebox. +Despite the module's name, it connects to FreeDB servers by default. +This began at version 1.04, when cddb.com changed its licensing model +to support end-user applications, not third-party libraries. +Connections to cddb.com may still work, and patches are welcome to +maintain that functionality, but it's no longer officially supported. + =head1 PUBLIC METHODS =over 4 @@ -1545,6 +1551,42 @@ Please see the cddb.t program in the t (tests) directory. It exercises every aspect of CDDB.pm, including submissions. +=head1 COMPATIBILITY + +CDDB.pm uses standard Perl modules. It has been tested at one point +or another on OS/2, MacOS and FreeBSD systems, as well as the systems +listed at: + + http://testers.cpan.org/search?request=dist&dist=CDDB + +If you want to submit disc information to the CDDB, you will need to +install two other modules: + + Mail::Internet will allow CDDB.pm to send email submissions, and it + automagically includes Mail::Header. + + MIME::QuotedPrint will allow CDDB.pm to send non-ASCII text + unscathed. Currently only ISO-8859-1 and ASCII are supported. + +All other features will work without these modules. + +=head1 KNOWN TEST FAILURES + +The last test in the "make test" suite will try to send a sample +submission to the CDDB if MailTools is present. It expects to find an +SMTP host in the SMTPHOST environment variable. It will fall back to +"mail" if SMTPHOST doesn't exist. If neither works, the test will be +skipped. To see why it's skipped: + + make test TEST_VERBOSE=1 + +Some of the tests (most notably numbers 25, 27 and 29) compare data +returned by a cddbp server against a stored copy of a previous query. +These tests fail occasionally since the database is constantly in +flux. Starting with version 1.00, the test program uses fuzzy +comparisons that should fail less. Version 1.04 saw even fuzzier +comparisons. Please report any problems so they can be fixed. + =head1 LINKS =head2 BUG TRACKER @@ -1553,7 +1595,8 @@ =head2 REPOSITORY -http://thirdlobe.com/svn/cddb/ +http://github.com/rcaputo/cddb-perl +http://gitorious.org/cddb-freedb-perl =head2 OTHER RESOURCES @@ -1561,7 +1604,7 @@ =head1 CONTACT AND COPYRIGHT -Copyright 1998-2009 Rocco Caputo. All rights reserved. This program +Copyright 1998-2013 Rocco Caputo. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff -Nru libcddb-perl-1.220/t/000-report-versions.t libcddb-perl-1.222/t/000-report-versions.t --- libcddb-perl-1.220/t/000-report-versions.t 1970-01-01 00:00:00.000000000 +0000 +++ libcddb-perl-1.222/t/000-report-versions.t 2013-08-15 07:12:57.000000000 +0000 @@ -0,0 +1,447 @@ +#!perl +use warnings; +use strict; +use Test::More 0.94; + +# Include a cut-down version of YAML::Tiny so we don't introduce unnecessary +# dependencies ourselves. + +package Local::YAML::Tiny; + +use strict; +use Carp 'croak'; + +# UTF Support? +sub HAVE_UTF8 () { $] >= 5.007003 } +BEGIN { + if ( HAVE_UTF8 ) { + # The string eval helps hide this from Test::MinimumVersion + eval "require utf8;"; + die "Failed to load UTF-8 support" if $@; + } + + # Class structure + require 5.004; + $YAML::Tiny::VERSION = '1.40'; + + # Error storage + $YAML::Tiny::errstr = ''; +} + +# Printable characters for escapes +my %UNESCAPES = ( + z => "\x00", a => "\x07", t => "\x09", + n => "\x0a", v => "\x0b", f => "\x0c", + r => "\x0d", e => "\x1b", '\\' => '\\', +); + + +##################################################################### +# Implementation + +# Create an empty YAML::Tiny object +sub new { + my $class = shift; + bless [ @_ ], $class; +} + +# Create an object from a file +sub read { + my $class = ref $_[0] ? ref shift : shift; + + # Check the file + my $file = shift or return $class->_error( 'You did not specify a file name' ); + return $class->_error( "File '$file' does not exist" ) unless -e $file; + return $class->_error( "'$file' is a directory, not a file" ) unless -f _; + return $class->_error( "Insufficient permissions to read '$file'" ) unless -r _; + + # Slurp in the file + local $/ = undef; + local *CFG; + unless ( open(CFG, $file) ) { + return $class->_error("Failed to open file '$file': $!"); + } + my $contents = ; + unless ( close(CFG) ) { + return $class->_error("Failed to close file '$file': $!"); + } + + $class->read_string( $contents ); +} + +# Create an object from a string +sub read_string { + my $class = ref $_[0] ? ref shift : shift; + my $self = bless [], $class; + my $string = $_[0]; + unless ( defined $string ) { + return $self->_error("Did not provide a string to load"); + } + + # Byte order marks + # NOTE: Keeping this here to educate maintainers + # my %BOM = ( + # "\357\273\277" => 'UTF-8', + # "\376\377" => 'UTF-16BE', + # "\377\376" => 'UTF-16LE', + # "\377\376\0\0" => 'UTF-32LE' + # "\0\0\376\377" => 'UTF-32BE', + # ); + if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) { + return $self->_error("Stream has a non UTF-8 BOM"); + } else { + # Strip UTF-8 bom if found, we'll just ignore it + $string =~ s/^\357\273\277//; + } + + # Try to decode as utf8 + utf8::decode($string) if HAVE_UTF8; + + # Check for some special cases + return $self unless length $string; + unless ( $string =~ /[\012\015]+\z/ ) { + return $self->_error("Stream does not end with newline character"); + } + + # Split the file into lines + my @lines = grep { ! /^\s*(?:\#.*)?\z/ } + split /(?:\015{1,2}\012|\015|\012)/, $string; + + # Strip the initial YAML header + @lines and $lines[0] =~ /^\%YAML[: ][\d\.]+.*\z/ and shift @lines; + + # A nibbling parser + while ( @lines ) { + # Do we have a document header? + if ( $lines[0] =~ /^---\s*(?:(.+)\s*)?\z/ ) { + # Handle scalar documents + shift @lines; + if ( defined $1 and $1 !~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/ ) { + push @$self, $self->_read_scalar( "$1", [ undef ], \@lines ); + next; + } + } + + if ( ! @lines or $lines[0] =~ /^(?:---|\.\.\.)/ ) { + # A naked document + push @$self, undef; + while ( @lines and $lines[0] !~ /^---/ ) { + shift @lines; + } + + } elsif ( $lines[0] =~ /^\s*\-/ ) { + # An array at the root + my $document = [ ]; + push @$self, $document; + $self->_read_array( $document, [ 0 ], \@lines ); + + } elsif ( $lines[0] =~ /^(\s*)\S/ ) { + # A hash at the root + my $document = { }; + push @$self, $document; + $self->_read_hash( $document, [ length($1) ], \@lines ); + + } else { + croak("YAML::Tiny failed to classify the line '$lines[0]'"); + } + } + + $self; +} + +# Deparse a scalar string to the actual scalar +sub _read_scalar { + my ($self, $string, $indent, $lines) = @_; + + # Trim trailing whitespace + $string =~ s/\s*\z//; + + # Explitic null/undef + return undef if $string eq '~'; + + # Quotes + if ( $string =~ /^\'(.*?)\'\z/ ) { + return '' unless defined $1; + $string = $1; + $string =~ s/\'\'/\'/g; + return $string; + } + if ( $string =~ /^\"((?:\\.|[^\"])*)\"\z/ ) { + # Reusing the variable is a little ugly, + # but avoids a new variable and a string copy. + $string = $1; + $string =~ s/\\"/"/g; + $string =~ s/\\([never\\fartz]|x([0-9a-fA-F]{2}))/(length($1)>1)?pack("H2",$2):$UNESCAPES{$1}/gex; + return $string; + } + + # Special cases + if ( $string =~ /^[\'\"!&]/ ) { + croak("YAML::Tiny does not support a feature in line '$lines->[0]'"); + } + return {} if $string eq '{}'; + return [] if $string eq '[]'; + + # Regular unquoted string + return $string unless $string =~ /^[>|]/; + + # Error + croak("YAML::Tiny failed to find multi-line scalar content") unless @$lines; + + # Check the indent depth + $lines->[0] =~ /^(\s*)/; + $indent->[-1] = length("$1"); + if ( defined $indent->[-2] and $indent->[-1] <= $indent->[-2] ) { + croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); + } + + # Pull the lines + my @multiline = (); + while ( @$lines ) { + $lines->[0] =~ /^(\s*)/; + last unless length($1) >= $indent->[-1]; + push @multiline, substr(shift(@$lines), length($1)); + } + + my $j = (substr($string, 0, 1) eq '>') ? ' ' : "\n"; + my $t = (substr($string, 1, 1) eq '-') ? '' : "\n"; + return join( $j, @multiline ) . $t; +} + +# Parse an array +sub _read_array { + my ($self, $array, $indent, $lines) = @_; + + while ( @$lines ) { + # Check for a new document + if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) { + while ( @$lines and $lines->[0] !~ /^---/ ) { + shift @$lines; + } + return 1; + } + + # Check the indent level + $lines->[0] =~ /^(\s*)/; + if ( length($1) < $indent->[-1] ) { + return 1; + } elsif ( length($1) > $indent->[-1] ) { + croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); + } + + if ( $lines->[0] =~ /^(\s*\-\s+)[^\'\"]\S*\s*:(?:\s+|$)/ ) { + # Inline nested hash + my $indent2 = length("$1"); + $lines->[0] =~ s/-/ /; + push @$array, { }; + $self->_read_hash( $array->[-1], [ @$indent, $indent2 ], $lines ); + + } elsif ( $lines->[0] =~ /^\s*\-(\s*)(.+?)\s*\z/ ) { + # Array entry with a value + shift @$lines; + push @$array, $self->_read_scalar( "$2", [ @$indent, undef ], $lines ); + + } elsif ( $lines->[0] =~ /^\s*\-\s*\z/ ) { + shift @$lines; + unless ( @$lines ) { + push @$array, undef; + return 1; + } + if ( $lines->[0] =~ /^(\s*)\-/ ) { + my $indent2 = length("$1"); + if ( $indent->[-1] == $indent2 ) { + # Null array entry + push @$array, undef; + } else { + # Naked indenter + push @$array, [ ]; + $self->_read_array( $array->[-1], [ @$indent, $indent2 ], $lines ); + } + + } elsif ( $lines->[0] =~ /^(\s*)\S/ ) { + push @$array, { }; + $self->_read_hash( $array->[-1], [ @$indent, length("$1") ], $lines ); + + } else { + croak("YAML::Tiny failed to classify line '$lines->[0]'"); + } + + } elsif ( defined $indent->[-2] and $indent->[-1] == $indent->[-2] ) { + # This is probably a structure like the following... + # --- + # foo: + # - list + # bar: value + # + # ... so lets return and let the hash parser handle it + return 1; + + } else { + croak("YAML::Tiny failed to classify line '$lines->[0]'"); + } + } + + return 1; +} + +# Parse an array +sub _read_hash { + my ($self, $hash, $indent, $lines) = @_; + + while ( @$lines ) { + # Check for a new document + if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) { + while ( @$lines and $lines->[0] !~ /^---/ ) { + shift @$lines; + } + return 1; + } + + # Check the indent level + $lines->[0] =~ /^(\s*)/; + if ( length($1) < $indent->[-1] ) { + return 1; + } elsif ( length($1) > $indent->[-1] ) { + croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); + } + + # Get the key + unless ( $lines->[0] =~ s/^\s*([^\'\" ][^\n]*?)\s*:(\s+|$)// ) { + if ( $lines->[0] =~ /^\s*[?\'\"]/ ) { + croak("YAML::Tiny does not support a feature in line '$lines->[0]'"); + } + croak("YAML::Tiny failed to classify line '$lines->[0]'"); + } + my $key = $1; + + # Do we have a value? + if ( length $lines->[0] ) { + # Yes + $hash->{$key} = $self->_read_scalar( shift(@$lines), [ @$indent, undef ], $lines ); + } else { + # An indent + shift @$lines; + unless ( @$lines ) { + $hash->{$key} = undef; + return 1; + } + if ( $lines->[0] =~ /^(\s*)-/ ) { + $hash->{$key} = []; + $self->_read_array( $hash->{$key}, [ @$indent, length($1) ], $lines ); + } elsif ( $lines->[0] =~ /^(\s*)./ ) { + my $indent2 = length("$1"); + if ( $indent->[-1] >= $indent2 ) { + # Null hash entry + $hash->{$key} = undef; + } else { + $hash->{$key} = {}; + $self->_read_hash( $hash->{$key}, [ @$indent, length($1) ], $lines ); + } + } + } + } + + return 1; +} + +# Set error +sub _error { + $YAML::Tiny::errstr = $_[1]; + undef; +} + +# Retrieve error +sub errstr { + $YAML::Tiny::errstr; +} + + + +##################################################################### +# Use Scalar::Util if possible, otherwise emulate it + +BEGIN { + eval { + require Scalar::Util; + }; + if ( $@ ) { + # Failed to load Scalar::Util + eval <<'END_PERL'; +sub refaddr { + my $pkg = ref($_[0]) or return undef; + if (!!UNIVERSAL::can($_[0], 'can')) { + bless $_[0], 'Scalar::Util::Fake'; + } else { + $pkg = undef; + } + "$_[0]" =~ /0x(\w+)/; + my $i = do { local $^W; hex $1 }; + bless $_[0], $pkg if defined $pkg; + $i; +} +END_PERL + } else { + Scalar::Util->import('refaddr'); + } +} + + +##################################################################### +# main test +##################################################################### + +package main; + +BEGIN { + + # Skip modules that either don't want to be loaded directly, such as + # Module::Install, or that mess with the test count, such as the Test::* + # modules listed here. + # + # Moose::Role conflicts if Moose is loaded as well, but Moose::Role is in + # the Moose distribution and it's certain that someone who uses + # Moose::Role also uses Moose somewhere, so if we disallow Moose::Role, + # we'll still get the relevant version number. + + my %skip = map { $_ => 1 } qw( + App::FatPacker + Class::Accessor::Classy + Devel::Cover + Module::Install + Moose::Role + POE::Loop::Tk + Template::Test + Test::Kwalitee + Test::Pod::Coverage + Test::Portability::Files + Test::YAML::Meta + open + ); + + my $Test = Test::Builder->new; + + $Test->plan(skip_all => "META.yml could not be found") + unless -f 'META.yml' and -r _; + + my $meta = (Local::YAML::Tiny->read('META.yml'))->[0]; + my %requires; + for my $require_key (grep { /requires/ } keys %$meta) { + my %h = %{ $meta->{$require_key} }; + $requires{$_}++ for keys %h; + } + delete $requires{perl}; + + diag("Testing with Perl $], $^X"); + for my $module (sort keys %requires) { + if ($skip{$module}) { + note "$module doesn't want to be loaded directly, skipping"; + next; + } + local $SIG{__WARN__} = sub { note "$module: $_[0]" }; + require_ok $module or BAIL_OUT("can't load $module"); + my $version = $module->VERSION; + $version = 'undefined' unless defined $version; + diag(" $module version is $version"); + } + done_testing; +} diff -Nru libcddb-perl-1.220/t/release-pod-coverage.t libcddb-perl-1.222/t/release-pod-coverage.t --- libcddb-perl-1.220/t/release-pod-coverage.t 1970-01-01 00:00:00.000000000 +0000 +++ libcddb-perl-1.222/t/release-pod-coverage.t 2013-08-15 07:12:57.000000000 +0000 @@ -0,0 +1,21 @@ +#!perl + +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' }); diff -Nru libcddb-perl-1.220/t/release-pod-syntax.t libcddb-perl-1.222/t/release-pod-syntax.t --- libcddb-perl-1.220/t/release-pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 +++ libcddb-perl-1.222/t/release-pod-syntax.t 2013-08-15 07:12:57.000000000 +0000 @@ -0,0 +1,15 @@ +#!perl + +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();