r5520 - in /packages/libmodule-versions-report-perl/branches/upstream/current: ChangeLog MANIFEST META.yml lib/Module/Versions/Report.pm

ntyni-guest at users.alioth.debian.org ntyni-guest at users.alioth.debian.org
Tue May 22 20:02:58 UTC 2007


Author: ntyni-guest
Date: Tue May 22 20:02:58 2007
New Revision: 5520

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5520
Log:
[svn-upgrade] Integrating new upstream version, libmodule-versions-report-perl (1.03)

Added:
    packages/libmodule-versions-report-perl/branches/upstream/current/META.yml
Modified:
    packages/libmodule-versions-report-perl/branches/upstream/current/ChangeLog
    packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST
    packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/Report.pm

Modified: packages/libmodule-versions-report-perl/branches/upstream/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/ChangeLog?rev=5520&op=diff
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/ChangeLog (original)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/ChangeLog Tue May 22 20:02:58 2007
@@ -1,7 +1,13 @@
 Revision history for Perl module Module::Versions::Report
                                         Time-stamp: "2003-06-21 23:17:33 AHDT"
 
-2003-06-21  Sean M. Burke  sburke at cpan.org
+2007-05-21  Ruslan U. Zakirov <ruz at bestpractical.com>
+
+	* Release 1.03
+	* count modules instead of records in tables
+	* update docs
+
+2003-06-21  Sean M. Burke <sburke at cpan.org>
 
 	* Release 1.02:  First public release
 	

Modified: packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST?rev=5520&op=diff
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST (original)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST Tue May 22 20:02:58 2007
@@ -6,3 +6,4 @@
 lib/Module/Versions/Report.pm
 t/00about.t
 t/10load.t
+META.yml                                 Module meta-data (added by MakeMaker)

Added: packages/libmodule-versions-report-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/META.yml?rev=5520&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/META.yml (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/META.yml Tue May 22 20:02:58 2007
@@ -1,0 +1,11 @@
+--- #YAML:1.0
+name:                Module-Versions-Report
+version:             1.03
+abstract:            report versions of all modules in memory
+license:             ~
+generated_by:        ExtUtils::MakeMaker version 6.32
+distribution_type:   module
+requires:     
+meta-spec:
+    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
+    version: 1.2

Modified: packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/Report.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/Report.pm?rev=5520&op=diff
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/Report.pm (original)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/Report.pm Tue May 22 20:02:58 2007
@@ -1,7 +1,8 @@
 
 require 5;
 package Module::Versions::Report;
-$VERSION = '1.02';
+$VERSION = '1.03';
+$PACKAGES_LIMIT = 1000;
 
 =head1 NAME
 
@@ -63,19 +64,34 @@
 modules in memory, and noting the version of each (for modules that
 defined a C<$VERSION>, at least).
 
-=head1 COPYRIGHT AND DISCLAIMER
+=head1 USING
 
-Copyright 2001-2003 Sean M. Burke. This library is free software; you
-can redistribute it and/or modify it under the same terms as Perl
-itself.
+=head2 Importing
 
-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.
+If this package is imported then END block is set, and report printed to
+stdout on a program exit, so use C<use Module::Versions::Report;> if you
+need a report on exit or C<use Module::Versions::Report ();> otherwise
+and call report or print_report functions yourself.
 
-=head1 AUTHOR
+=cut
 
-Sean M. Burke, E<lt>sburke at cpan.orgE<gt>
+$Already = 0;
+
+sub import {
+  # so "use Module::Versions::Report;" sets up the END block, but
+  # a mere "use Module::Versions::Report ();" doesn't.
+  unless($Already) {
+    eval 'END { print_report(); }';
+    die "Extremely unexpected error in ", __PACKAGE__, ": $@" if $@;
+    $Already = 1;
+  }
+  return;
+}
+
+=head2 report and print_report functions
+
+The first one returns preformatted report as a string, the latter outputs
+a report to stdout.
 
 =cut
 
@@ -100,14 +116,15 @@
   my $pref;
   while(@stack) {
     $this = shift @stack;
-    die "Too many packages?" if ++$count > 1000;
+    die "Too many packages?" if $count > $PACKAGES_LIMIT;
     next if exists $v{$this};
     next if $this eq 'main'; # %main:: is %::
 
     #print "Peeking at $this => ${$this . '::VERSION'}\n";
     
     if(defined ${$this . '::VERSION'} ) {
-      $v{$this} = ${$this . '::VERSION'}
+      $v{$this} = ${$this . '::VERSION'};
+      $count++;
     } elsif(
        defined *{$this . '::ISA'} or defined &{$this . '::import'}
        or ($this ne '' and grep defined *{$_}{'CODE'}, values %{$this . "::"})
@@ -115,6 +132,7 @@
     ) {
       # It's a class/module with no version.
       $v{$this} = undef;
+      $count++;
     } else {
       # It's probably an unpopulated package.
       ## $v{$this} = '...';
@@ -139,19 +157,27 @@
 
 sub print_report { print '', report(); }
 
-$Already = 0;
+1;
 
-sub import {
-  # so "use Module::Versions::Report;" sets up the END block, but
-  # a mere "use Module::Versions::Report ();" doesn't.
-  unless($Already) {
-    eval 'END { print_report(); }';
-    die "Extremely unexpected error in ", __PACKAGE__, ": $@" if $@;
-    $Already = 1;
-  }
-  return;
-}
-1;
+=head1 COPYRIGHT AND DISCLAIMER
+
+Copyright 2001-2003 Sean M. Burke. This library is free software; you
+can redistribute it and/or modify it under the same terms as Perl
+itself.
+
+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.
+
+=head1 MAINTAINER
+
+Ruslan U. Zakirov E<lt>ruz at bestpractical.comE<gt>
+
+=head1 AUTHOR
+
+Sean M. Burke, E<lt>sburke at cpan.orgE<gt>
+
+=cut
 
 __END__
 




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