r66562 - in /trunk/libparse-cpan-packages-perl: CHANGES META.yml debian/README.source debian/changelog debian/control debian/copyright debian/patches/whatis-entries.diff debian/rules debian/source/ debian/source/format lib/Parse/CPAN/Packages.pm

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Tue Dec 28 17:17:18 UTC 2010


Author: jawnsy-guest
Date: Tue Dec 28 17:13:55 2010
New Revision: 66562

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=66562
Log:
Very minor change: reduction in memory usage, and fix docs
Not sure if we should upload, ignore for now.
IGNORE-VERSION: 2.33-1
* New upstream release
* Use new 3.0 (quilt) source format
* Use new short debhelper rules format
* Refresh copyright information
* Refresh patches and headers
* Rewrite control description
* Standards-Version 3.9.1 (no changes)
* Add myself to Uploaders and Copyright

Added:
    trunk/libparse-cpan-packages-perl/debian/source/
    trunk/libparse-cpan-packages-perl/debian/source/format
Removed:
    trunk/libparse-cpan-packages-perl/debian/README.source
Modified:
    trunk/libparse-cpan-packages-perl/CHANGES
    trunk/libparse-cpan-packages-perl/META.yml
    trunk/libparse-cpan-packages-perl/debian/changelog
    trunk/libparse-cpan-packages-perl/debian/control
    trunk/libparse-cpan-packages-perl/debian/copyright
    trunk/libparse-cpan-packages-perl/debian/patches/whatis-entries.diff
    trunk/libparse-cpan-packages-perl/debian/rules
    trunk/libparse-cpan-packages-perl/lib/Parse/CPAN/Packages.pm

Modified: trunk/libparse-cpan-packages-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/CHANGES?rev=66562&op=diff
==============================================================================
--- trunk/libparse-cpan-packages-perl/CHANGES (original)
+++ trunk/libparse-cpan-packages-perl/CHANGES Tue Dec 28 17:13:55 2010
@@ -1,4 +1,13 @@
 CHANGES file for Parse::CPAN::Packages
+
+2.33 Sun Dec 27 10:42:59 GMT+2 2010
+  - updated documentation
+    - explanation on how to use local cpan cache ( thanks to Slaven Rezić <SREZIC at cpan.org> )
+    - spelling and package name fixes ( Phillip Moore <w.phillip.moore at gmail.com> )
+  - improved memory use a bit by eleminating temp variable ( thanks to Chris 'BinGOs' Williams <chris at bingosnet.co.uk> )
+
+2.32 Sun Dec 26 14:02:59 GMT+2 2010
+  - better windows compatibility ( thanks to Vincent Pit <perl at profvince.com> )
 
 2.31 Thu Apr 23 11:55:59 BST 2009
   - use BUILDARGS and BUILD instead of having our own constructor
@@ -16,7 +25,7 @@
     (patch by Mark Fowler)
 
 2.28 Tue Aug 12 08:02:22 BST 2008
-  - stop version.pm warnings 
+  - stop version.pm warnings
 
 2.27 Sun Dec  2 14:50:14 GMT 2007
   - fix typo in _ensure_latest_distribution (patch by Kenichi Ishigaki)

Modified: trunk/libparse-cpan-packages-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/META.yml?rev=66562&op=diff
==============================================================================
--- trunk/libparse-cpan-packages-perl/META.yml (original)
+++ trunk/libparse-cpan-packages-perl/META.yml Tue Dec 28 17:13:55 2010
@@ -1,18 +1,26 @@
 --- #YAML:1.0
-name:                Parse-CPAN-Packages
-version:             2.31
-abstract:            Parse 02packages.details.txt.gz
-license:             perl
-author:              
+name:               Parse-CPAN-Packages
+version:            2.33
+abstract:           Parse 02packages.details.txt.gz
+author:
     - Leon Brocard <acme at astray.com>
-generated_by:        ExtUtils::MakeMaker version 6.44
-distribution_type:   module
-requires:     
-    Compress::Zlib:                0
-    CPAN::DistnameInfo:            0
-    Moose:                         0
-    Test::More:                    0
-    version:                       0
+license:            perl
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    Compress::Zlib:      0
+    CPAN::DistnameInfo:  0
+    Moose:               0
+    Test::More:          0
+    version:             0
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
-    version: 1.3
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: trunk/libparse-cpan-packages-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/debian/changelog?rev=66562&op=diff
==============================================================================
--- trunk/libparse-cpan-packages-perl/debian/changelog (original)
+++ trunk/libparse-cpan-packages-perl/debian/changelog Tue Dec 28 17:13:55 2010
@@ -1,4 +1,18 @@
-libparse-cpan-packages-perl (2.31-2) UNRELEASED; urgency=low
+libparse-cpan-packages-perl (2.33-1) UNRELEASED; urgency=low
+
+  Very minor change: reduction in memory usage, and fix docs
+  Not sure if we should upload, ignore for now.
+  IGNORE-VERSION: 2.33-1
+
+  [ Jonathan Yu ]
+  * New upstream release
+  * Use new 3.0 (quilt) source format
+  * Use new short debhelper rules format
+  * Refresh copyright information
+  * Refresh patches and headers
+  * Rewrite control description
+  * Standards-Version 3.9.1 (no changes)
+  * Add myself to Uploaders and Copyright
 
   [ Nathan Handler ]
   * debian/watch: Update to ignore development releases.
@@ -15,7 +29,7 @@
   [ Ansgar Burchardt ]
   * Update my email address.
 
- -- Nathan Handler <nhandler at ubuntu.com>  Sat, 06 Jun 2009 01:36:50 +0000
+ -- Jonathan Yu <jawnsy at cpan.org>  Tue, 28 Dec 2010 12:29:23 -0500
 
 libparse-cpan-packages-perl (2.31-1) unstable; urgency=low
 

Modified: trunk/libparse-cpan-packages-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/debian/control?rev=66562&op=diff
==============================================================================
--- trunk/libparse-cpan-packages-perl/debian/control (original)
+++ trunk/libparse-cpan-packages-perl/debian/control Tue Dec 28 17:13:55 2010
@@ -1,35 +1,35 @@
 Source: libparse-cpan-packages-perl
 Section: perl
 Priority: optional
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: perl,
+ libcpan-distnameinfo-perl,
+ libmoose-perl,
+ libtest-pod-perl,
+ libtest-pod-coverage-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Niko Tyni <ntyni at iki.fi>,
  gregor herrmann <gregoa at debian.org>,
  Gunnar Wolf <gwolf at debian.org>,
+ Jonathan Yu <jawnsy at cpan.org>,
  Jaldhar H. Vyas <jaldhar at debian.org>,
  Ansgar Burchardt <ansgar at debian.org>,
  Brian Cassidy <brian.cassidy at gmail.com>
-Build-Depends: debhelper (>= 7), quilt
-Build-Depends-Indep: perl, libcpan-distnameinfo-perl (>= 0.03),
- libmoose-perl, perl (>= 5.10) | libversion-perl,
- perl (>= 5.10) | libio-compress-perl | libcompress-zlib-perl,
- libtest-pod-perl (>= 1.14), libtest-pod-coverage-perl (>= 1.00)
-Standards-Version: 3.8.1
+Standards-Version: 3.9.1
 Homepage: http://search.cpan.org/dist/Parse-CPAN-Packages/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libparse-cpan-packages-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libparse-cpan-packages-perl/
 
 Package: libparse-cpan-packages-perl
 Architecture: all
-Depends: ${misc:Depends}, ${perl:Depends}, libcpan-distnameinfo-perl (>= 0.03),
- libmoose-perl, perl (>= 5.10) | libversion-perl,
- perl (>= 5.10) | libio-compress-perl | libcompress-zlib-perl
-Description: Perl module to parse 02packages.details.txt.gz
- The Comprehensive Perl Archive Network (CPAN) is a very useful
- collection of Perl code. It has several indices of the files that it
- hosts, including a file named "02packages.details.txt.gz" in the
- "modules" directory. This file contains lots of useful information and
- Parse::CPAN::Packages provides a simple interface to the data contained
+Depends: ${misc:Depends}, ${perl:Depends},
+ libcpan-distnameinfo-perl,
+ libmoose-perl
+Description: module to parse the CPAN Packages file
+ Parse::CPAN::Packages is a Perl module that parses the package details index
+ file named "02packages.details.txt.gz". This file contains lots of useful
+ information and this module provides a simple interface to the data contained
  within.
  .
- Note that this module does not concern itself with downloading or
- unpacking this file. You should do this yourself.
+ Note that this module does not concern itself with downloading or unpacking
+ the "02packages.details.txt.gz" file; you will need to do this yourself.

Modified: trunk/libparse-cpan-packages-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/debian/copyright?rev=66562&op=diff
==============================================================================
--- trunk/libparse-cpan-packages-perl/debian/copyright (original)
+++ trunk/libparse-cpan-packages-perl/debian/copyright Tue Dec 28 17:13:55 2010
@@ -1,29 +1,34 @@
-Format-Specification:
-    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: Leon Brocard <acme at astray.com>
-Upstream-Source: http://search.cpan.org/dist/Parse-CPAN-Packages/
-Upstream-Name: Parse-CPAN-Packages
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: Leon Brocard <acme at astray.com>
+Source: http://search.cpan.org/dist/Parse-CPAN-Packages/
+Name: Parse-CPAN-Packages
 
 Files: *
 Copyright: 2004-2009, Leon Brocard <acme at astray.com>
-License-Alias: Perl
-License: Artistic | GPL-1+
+License: Artistic or GPL-1+
 
 Files: debian/*
-Copyright: Various members of the Debian Perl Group,
- cf. debian/changelog
-License: Artistic | GPL-1+
+Copyright: 2010, Jonathan Yu <jawnsy at cpan.org>
+ 2009, Brian Cassidy <bricas at cpan.org>
+ 2008-2009, Ansgar Burchardt <ansgar at debian.org>
+ 2006-2008, gregor herrmann <gregoa at debian.org>
+ 2007, Gunnar Wolf <gwolf at debian.org>
+ 2006, Niko Tyni <ntyni at debian.org>
+ 2004, Florian Ragwitz <rafl at debian.org>
+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
+ 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 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
-    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.
-    On Debian GNU/Linux systems, the complete text of the GNU General
-    Public License can be found in `/usr/share/common-licenses/GPL'
+ 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.
+ .
+ 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'.

Modified: trunk/libparse-cpan-packages-perl/debian/patches/whatis-entries.diff
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/debian/patches/whatis-entries.diff?rev=66562&op=diff
==============================================================================
--- trunk/libparse-cpan-packages-perl/debian/patches/whatis-entries.diff (original)
+++ trunk/libparse-cpan-packages-perl/debian/patches/whatis-entries.diff Tue Dec 28 17:13:55 2010
@@ -1,7 +1,7 @@
-Subject: Add missing whatis entries
-From: Ansgar Burchardt <ansgar at 43-1.org>
-Date: Fri, 23 Jan 2009 19:55:00 +0100
-
+Description: add missing whatis entries
+Author: Ansgar Burchardt <ansgar at debian.org>
+Origin: vendor
+Forwarded: no
 --- libparse-cpan-packages-perl.orig/lib/Parse/CPAN/Packages/Distribution.pm
 +++ libparse-cpan-packages-perl/lib/Parse/CPAN/Packages/Distribution.pm
 @@ -28,7 +28,7 @@

Modified: trunk/libparse-cpan-packages-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/debian/rules?rev=66562&op=diff
==============================================================================
--- trunk/libparse-cpan-packages-perl/debian/rules (original)
+++ trunk/libparse-cpan-packages-perl/debian/rules Tue Dec 28 17:13:55 2010
@@ -1,25 +1,4 @@
 #!/usr/bin/make -f
 
-include /usr/share/quilt/quilt.make
-
-build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
-	dh build
-	touch $@
-
-clean: unpatch
+%:
 	dh $@
-
-install: install-stamp
-install-stamp: build-stamp
-	dh install
-	touch $@
-
-binary-arch:
-
-binary-indep: install
-	dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build

Added: trunk/libparse-cpan-packages-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/debian/source/format?rev=66562&op=file
==============================================================================
--- trunk/libparse-cpan-packages-perl/debian/source/format (added)
+++ trunk/libparse-cpan-packages-perl/debian/source/format Tue Dec 28 17:13:55 2010
@@ -1,0 +1,1 @@
+3.0 (quilt)

Modified: trunk/libparse-cpan-packages-perl/lib/Parse/CPAN/Packages.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libparse-cpan-packages-perl/lib/Parse/CPAN/Packages.pm?rev=66562&op=diff
==============================================================================
--- trunk/libparse-cpan-packages-perl/lib/Parse/CPAN/Packages.pm (original)
+++ trunk/libparse-cpan-packages-perl/lib/Parse/CPAN/Packages.pm Tue Dec 28 17:13:55 2010
@@ -5,7 +5,7 @@
 use Parse::CPAN::Packages::Distribution;
 use Parse::CPAN::Packages::Package;
 use version;
-our $VERSION = '2.31';
+our $VERSION = '2.33';
 
 has 'filename'    => ( is => 'rw', isa => 'Str' );
 has 'details'     => ( is => 'rw', isa => 'HashRef', default => sub { {} } );
@@ -39,6 +39,7 @@
         return $filename;
     } elsif ( $filename =~ /\.gz/ ) {
         open( IN, $filename ) || die "Failed to read $filename: $!";
+		binmode *IN;
         my $data = join '', <IN>;
         close(IN);
         return Compress::Zlib::memGunzip($data);
@@ -46,8 +47,10 @@
         return Compress::Zlib::memGunzip($filename);
     } else {
         open( IN, $filename ) || die "Failed to read $filename: $!";
-        return join '', <IN>;
+        binmode *IN;
+        my $data = join '', <IN>;
         close(IN);
+		return $data;
     }
 }
 
@@ -61,10 +64,9 @@
 
 sub parse {
     my ( $self, $filename ) = @_;
-    my $details = $self->_slurp_details($filename);
 
     # read the preamble
-    my @details = split "\n", $details;
+    my @details = split "\n", $self->_slurp_details($filename);
     while (@details) {
         local $_ = shift @details;
         last if /^\s*$/;
@@ -309,12 +311,21 @@
    my $data = get("http://www.cpan.org/modules/02packages.details.txt.gz");
    my $p = Parse::CPAN::Packages->new($data);
 
+If you have a configured L<CPAN>, then there's usually already a
+cached file available:
+
+   use CPAN;
+   $CPAN::Be_Silent = 1;
+   CPAN::HandleConfig->load;
+   my $file = $CPAN::Config->{keep_source_where} . "/modules/02packages.details.txt.gz";
+   my $p = Parse::CPAN::Packages->new($file);
+
 =item package($packagename)
 
 Returns a C<Parse::CPAN::Packages::Package> that represents the
 named package.
 
-  my $p = Parse::CPAN::Distribution->new($gzfilename);
+  my $p = Parse::CPAN::Packages->new($gzfilename);
   my $package = $p->package("Acme::Colour");
 
 =item packages()
@@ -324,20 +335,20 @@
 
 =item package_count()
 
-Returns the numebr of packages stored.
+Returns the number of packages stored.
 
 =item distribution($filename)
 
-Returns a B<Parse::CPAN::Distribution> that represents the
-filename passed:
-
-  my $p = Parse::CPAN::Distribution->new($gzfilename);
+Returns a B<Parse::CPAN::Packages::Distribution> object that
+represents the filename passed:
+
+  my $p = Parse::CPAN::Packages->new($gzfilename);
   my $dist = $p->distribution('L/LB/LBROCARD/Acme-Colour-1.00.tar.gz');
 
 =item distributions()
 
-Returns a list of B<Parse::CPAN::Distribution> objects representing
-all the known distributions.
+Returns a list of B<Parse::CPAN::Packages::Distribution> objects
+representing all the known distributions.
 
 =item distribution_count()
 
@@ -345,18 +356,19 @@
 
 =item latest_distribution($distname)
 
-Returns the C<Parse::CPAN::Distribution> that represents the latest
-distribution for the named disribution passed, that is to say it
-returns the distribution that has the highest version number (as
-determined by version.pm or number comparison if that fails):
-
-  my $p = Parse::CPAN::Distribution->new($gzfilename);
+Returns the C<Parse::CPAN::Packages::Distribution> object that
+represents the latest distribution for the named disribution passed,
+that is to say it returns the distribution that has the highest
+version number (as determined by version.pm or number comparison if
+that fails):
+
+  my $p = Parse::CPAN::Packages->new($gzfilename);
   my $dist = $p->distribution('Acme-Color');
 
 =item latest_distrbutions()
 
-Returns a list of B<Parse::CPAN::Distribution> objects representing
-all the latest distributions.
+Returns a list of B<Parse::CPAN::Packages::Distribution> objects
+representing all the latest distributions.
 
 =item latest_distribution_count()
 




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