r4567 - in /packages/libmodule-versions-report-perl: ./ branches/
branches/upstream/ branches/upstream/current/
branches/upstream/current/lib/ branches/upstream/current/lib/Module/
branches/upstream/current/lib/Module/Versions/ branches/upstream/current/t/
tags/
ntyni-guest at users.alioth.debian.org
ntyni-guest at users.alioth.debian.org
Mon Dec 4 23:18:14 CET 2006
Author: ntyni-guest
Date: Mon Dec 4 23:18:14 2006
New Revision: 4567
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4567
Log:
[svn-inject] Installing original source of libmodule-versions-report-perl
Added:
packages/libmodule-versions-report-perl/
packages/libmodule-versions-report-perl/branches/
packages/libmodule-versions-report-perl/branches/upstream/
packages/libmodule-versions-report-perl/branches/upstream/current/
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/MANIFEST.SKIP
packages/libmodule-versions-report-perl/branches/upstream/current/Makefile.PL
packages/libmodule-versions-report-perl/branches/upstream/current/README
packages/libmodule-versions-report-perl/branches/upstream/current/lib/
packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/
packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/
packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/Report.pm
packages/libmodule-versions-report-perl/branches/upstream/current/t/
packages/libmodule-versions-report-perl/branches/upstream/current/t/00about.t
packages/libmodule-versions-report-perl/branches/upstream/current/t/10load.t
packages/libmodule-versions-report-perl/tags/
Added: 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=4567&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/ChangeLog (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/ChangeLog Mon Dec 4 23:18:14 2006
@@ -1,0 +1,11 @@
+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
+
+ * Release 1.02: First public release
+
+ (Before this it just sat around on my hard drive for a year,
+ as I fiddled with its docs, and vacillated on which name to
+ release it as.)
+
Added: 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=4567&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST Mon Dec 4 23:18:14 2006
@@ -1,0 +1,8 @@
+ChangeLog
+MANIFEST
+MANIFEST.SKIP
+Makefile.PL
+README
+lib/Module/Versions/Report.pm
+t/00about.t
+t/10load.t
Added: packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST.SKIP?rev=4567&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST.SKIP (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/MANIFEST.SKIP Mon Dec 4 23:18:14 2006
@@ -1,0 +1,7 @@
+^MANIFEST\.bak$
+Makefile(\.old)?$
+\.rej$
+CVS
+blib
+~
+
Added: packages/libmodule-versions-report-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/Makefile.PL?rev=4567&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/Makefile.PL (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/Makefile.PL Mon Dec 4 23:18:14 2006
@@ -1,0 +1,24 @@
+# This -*- perl -*- script writes the Makefile for Module::Versions::Report
+# Time-stamp: "2003-06-21 23:27:37 AHDT"
+require 5.004;
+use strict;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'Module-Versions-Report',
+ VERSION_FROM => 'lib/Module/Versions/Report.pm',
+ ABSTRACT => 'report versions of all modules in memory',
+ 'dist' => { COMPRESS => 'gzip -6f', SUFFIX => 'gz', },
+);
+
+package MY;
+
+sub libscan
+{ # Determine things that should *not* be installed
+ my($self, $path) = @_;
+ return '' if $path =~ m/~/;
+ $path;
+}
+
+__END__
+
Added: packages/libmodule-versions-report-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/README?rev=4567&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/README (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/README Mon Dec 4 23:18:14 2006
@@ -1,0 +1,124 @@
+README for Module::Report::Versions
+ Time-stamp: "2003-06-21 23:18:00 AHDT"
+
+NAME
+ Module::Versions::Report -- report versions of all modules in memory
+
+SYNOPSIS
+ use Module::Versions::Report;
+
+ ...and any code you want...
+
+ This will run all your code normally, but then as the Perl interpreter
+ is about to exit, it will print something like:
+
+ Perl v5.6.1 under MSWin32.
+ Modules in memory:
+ attributes;
+ AutoLoader v5.58;
+ Carp;
+ Config;
+ DynaLoader v1.04;
+ Exporter v5.562;
+ Module::Versions::Report v1.01;
+ HTML::Entities v1.22;
+ HTML::HeadParser v2.15;
+ HTML::Parser v3.25;
+ [... and whatever other modules were loaded that session...]
+
+ Consider its use from the command line:
+
+ % perl -MModule::Versions::Report -MLWP -e 1
+
+ Perl v5.6.1 under MSWin32.
+ Modules in memory:
+ attributes;
+ AutoLoader v5.58;
+ [...]
+
+DESCRIPTION
+ I often get email from someone reporting a bug in a module I've written.
+ I email back, asking what version of the module it is, what version of
+ Perl on what OS, and sometimes what version of some relevent third
+ library (like XML::Parser). They reply, saying "Perl 5". I say "I need
+ the exact version, as reported by "perl -v"". They tell me. And I say
+ "I, uh, also asked about the version of my module and XML::Parser [or
+ whatever]". They say "Oh yeah. It's 2.27". "Is that my module or
+ XML::Parser?" "XML::Parser." "OK, and what about my module's version?"
+ "Ohyeah. That's 3.11." By this time, days have passed, and what should
+ have been a simple operation -- reporting the version of Perl and
+ relevent modules, has been needlessly complicated.
+
+ This module is for simplifying that task. If you add "use
+ Module::Versions::Report;" to a program (especially handy if your
+ program is one that demonstrates a bug in some module), then when the
+ program has finished running, you well get a report detailing the all
+ modules in memory, and noting the version of each (for modules that
+ defined a $VERSION, at least).
+
+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.
+
+AUTHOR
+ Sean M. Burke, <sburke at cpan.org>
+
+
+
+PREREQUISITES
+
+This suite requires Perl 5.
+
+
+INSTALLATION
+
+You install Module::Versions::Report, as you would install any Perl module
+distribution, by running these commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+If you want to install a private copy of Module::Versions::Report in
+your home directory, then you should try to produce the initial Makefile
+with something like this command:
+
+ perl Makefile.PL LIB=~/perl
+
+See perldoc perlmodinstall for more information.
+
+
+DOCUMENTATION
+
+See the pod in Module::Versions::Report.
+
+
+SUPPORT
+
+Questions, bug reports, useful code bits, and suggestions for
+Worms should be sent to me at sburke at cpan.org
+
+
+AVAILABILITY
+
+The latest version of Module::Versions::Report is available from the
+Comprehensive Perl Archive Network (CPAN). Visit
+<http://www.perl.com/CPAN/> to find a CPAN site near you.
+
+
+COPYRIGHT
+
+Copyright 2001-2003, Sean M. Burke <sburke at cpan.org>, all rights
+reserved. This program is free software; you can redistribute it
+and/or modify it under the same terms as Perl itself.
+
+
+AUTHOR
+
+Sean M. Burke <sburke at cpan.org>
Added: 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=4567&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/Report.pm (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/lib/Module/Versions/Report.pm Mon Dec 4 23:18:14 2006
@@ -1,0 +1,157 @@
+
+require 5;
+package Module::Versions::Report;
+$VERSION = '1.02';
+
+=head1 NAME
+
+Module::Versions::Report -- report versions of all modules in memory
+
+=head1 SYNOPSIS
+
+ use Module::Versions::Report;
+
+ ...and any code you want...
+
+This will run all your code normally, but then as the Perl
+interpreter is about to exit, it will print something
+like:
+
+ Perl v5.6.1 under MSWin32.
+ Modules in memory:
+ attributes;
+ AutoLoader v5.58;
+ Carp;
+ Config;
+ DynaLoader v1.04;
+ Exporter v5.562;
+ Module::Versions::Report v1.01;
+ HTML::Entities v1.22;
+ HTML::HeadParser v2.15;
+ HTML::Parser v3.25;
+ [... and whatever other modules were loaded that session...]
+
+Consider its use from the command line:
+
+ % perl -MModule::Versions::Report -MLWP -e 1
+
+ Perl v5.6.1 under MSWin32.
+ Modules in memory:
+ attributes;
+ AutoLoader v5.58;
+ [...]
+
+=head1 DESCRIPTION
+
+I often get email from someone reporting a bug in a module I've
+written. I email back, asking what version of the module it is,
+what version of Perl on what OS, and sometimes what version of
+some relevent third library (like XML::Parser). They reply,
+saying "Perl 5". I say "I need the exact version, as reported
+by C<perl -v>". They tell me. And I say "I, uh, also asked about
+the version of my module and XML::Parser [or whatever]". They say
+"Oh yeah. It's 2.27". "Is that my module or XML::Parser?"
+"XML::Parser." "OK, and what about my module's
+version?" "Ohyeah. That's 3.11." By this time, days have passed,
+and what should have been a simple operation -- reporting the version
+of Perl and relevent modules, has been needlessly complicated.
+
+This module is for simplifying that task. If you add "use
+Module::Versions::Report;" to a program (especially handy if your
+program is one that demonstrates a bug in some module), then when the
+program has finished running, you well get a report detailing the all
+modules in memory, and noting the version of each (for modules that
+defined a C<$VERSION>, at least).
+
+=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 AUTHOR
+
+Sean M. Burke, E<lt>sburke at cpan.orgE<gt>
+
+=cut
+
+sub report {
+ my @out;
+ push @out,
+ "\n\nPerl v",
+ defined($^V) ? sprintf('%vd', $^V) : $],
+ " under $^O ",
+ (defined(&Win32::BuildNumber) and defined &Win32::BuildNumber())
+ ? ("(Win32::BuildNumber ", &Win32::BuildNumber(), ")") : (),
+ (defined $MacPerl::Version)
+ ? ("(MacPerl version $MacPerl::Version)") : (),
+ "\n"
+ ;
+
+ # Ugly code to walk the symbol tables:
+ my %v;
+ my @stack = (''); # start out in %::
+ my $this;
+ my $count = 0;
+ my $pref;
+ while(@stack) {
+ $this = shift @stack;
+ die "Too many packages?" if ++$count > 1000;
+ 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'}
+ } elsif(
+ defined *{$this . '::ISA'} or defined &{$this . '::import'}
+ or ($this ne '' and grep defined *{$_}{'CODE'}, values %{$this . "::"})
+ # If it has an ISA, an import, or any subs...
+ ) {
+ # It's a class/module with no version.
+ $v{$this} = undef;
+ } else {
+ # It's probably an unpopulated package.
+ ## $v{$this} = '...';
+ }
+
+ $pref = length($this) ? "$this\::" : '';
+ push @stack, map m/^(.+)::$/ ? "$pref$1" : (), keys %{$this . '::'};
+ #print "Stack: @stack\n";
+ }
+ push @out, " Modules in memory:\n";
+ delete @v{'', '<none>'};
+ foreach my $p (sort {lc($a) cmp lc($b)} keys %v) {
+ #$indent = ' ' x (2 + ($p =~ tr/:/:/));
+ push @out, ' ',
+ # $indent,
+ $p, defined($v{$p}) ? " v$v{$p};\n" : ";\n";
+ }
+ push @out, sprintf "[at %s (local) / %s (GMT)]\n",
+ scalar(localtime), scalar(gmtime);
+ return join '', @out;
+}
+
+sub print_report { print '', report(); }
+
+$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;
+}
+1;
+
+__END__
+
Added: packages/libmodule-versions-report-perl/branches/upstream/current/t/00about.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/t/00about.t?rev=4567&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/t/00about.t (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/t/00about.t Mon Dec 4 23:18:14 2006
@@ -1,0 +1,28 @@
+
+require 5;
+use Test;
+BEGIN { plan tests => 1; }
+use Module::Versions::Report ();
+
+print "#\n#\n",
+ "# Module::Versions::Report v$Module::Versions::Report::VERSION\n",
+ "#\n#\n",
+;
+
+print "# Running under perl version $] for $^O",
+ (chr(65) eq 'A') ? "\n" : " in a non-ASCII world\n";
+
+print "# Win32::BuildNumber ", &Win32::BuildNumber(), "\n"
+ if defined(&Win32::BuildNumber) and defined &Win32::BuildNumber();
+
+print "# MacPerl verison $MacPerl::Version\n"
+ if defined $MacPerl::Version;
+
+printf
+ "# Current time local: %s\n# Current time GMT: %s\n",
+ scalar( gmtime($^T)), scalar(localtime($^T));
+
+print "# Using Test.pm v", $Test::VERSION || "?", "\n";
+
+ok 1;
+
Added: packages/libmodule-versions-report-perl/branches/upstream/current/t/10load.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmodule-versions-report-perl/branches/upstream/current/t/10load.t?rev=4567&op=file
==============================================================================
--- packages/libmodule-versions-report-perl/branches/upstream/current/t/10load.t (added)
+++ packages/libmodule-versions-report-perl/branches/upstream/current/t/10load.t Mon Dec 4 23:18:14 2006
@@ -1,0 +1,55 @@
+
+require 5;
+use strict;
+use Test;
+my @modules;
+
+BEGIN {
+ @modules =
+ # Modules that have a $VERSION each, and have been in core for ages
+ qw(
+ Fcntl File::Basename File::Copy File::Path FileHandle FindBin
+ Getopt::Long IO::File POSIX Text::Tabs
+ );
+ my $testcount = 2 + 3 * @modules;
+ plan tests => $testcount;
+ print "# ~ ~ ~ Expecting $testcount tests ~ ~ ~\n";
+}
+
+use Module::Versions::Report ();
+
+
+ok 1;
+foreach my $m (@modules) {
+ print "# requiring $m...\n";
+ eval "require $m;";
+ die "Can't require $m: $@\nAborting" if $@;
+ ok 1;
+}
+
+my $out = Module::Versions::Report::report();
+
+{ my $o = $out; $o =~ s/^/# /mg; print "#\n#\n# Output:\n$o#\n"; }
+
+foreach my $m (@modules) {
+ my $mq = quotemeta($m);
+ my $mv = quotemeta(do { no strict 'refs'; ${"$m\::VERSION"} || 'WHA' } );
+ if($out =~ m/$mq/) {
+ ok 1;
+ } else {
+ ok 0;
+ print "# Can't find $mq in output\n";
+ }
+
+ if($out =~ m/$mv/) {
+ ok 1;
+ } else {
+ ok 0;
+ print "# Can't find $mv in output\n";
+ }
+
+}
+
+print "# Byebye!\n";
+ok 1;
+
More information about the Pkg-perl-cvs-commits
mailing list