r6228 - in /branches/upstream/libtk-pod-perl/current: Changes META.yml Makefile.PL Pod.pm Pod/FindPods.pm Pod/Text.pm TODO t/cmdline.t tkpod
segre at users.alioth.debian.org
segre at users.alioth.debian.org
Thu Aug 2 07:43:29 UTC 2007
Author: segre
Date: Thu Aug 2 07:43:29 2007
New Revision: 6228
URL: http://svn.debian.org/wsvn/?sc=1&rev=6228
Log:
[svn-upgrade] Integrating new upstream version, libtk-pod-perl (0.9935)
Modified:
branches/upstream/libtk-pod-perl/current/Changes
branches/upstream/libtk-pod-perl/current/META.yml
branches/upstream/libtk-pod-perl/current/Makefile.PL
branches/upstream/libtk-pod-perl/current/Pod.pm
branches/upstream/libtk-pod-perl/current/Pod/FindPods.pm
branches/upstream/libtk-pod-perl/current/Pod/Text.pm
branches/upstream/libtk-pod-perl/current/TODO
branches/upstream/libtk-pod-perl/current/t/cmdline.t
branches/upstream/libtk-pod-perl/current/tkpod
Modified: branches/upstream/libtk-pod-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/Changes?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Changes (original)
+++ branches/upstream/libtk-pod-perl/current/Changes Thu Aug 2 07:43:29 2007
@@ -1,4 +1,11 @@
History for Tk::Pod
+
+version 0.9935
+ o fixed missing "use" in tkpod (spotted by Torsten Foertsch)
+ o nicer diagnostics output when finding duplicate modules
+ o better STDERR diagnostics if Pod cannot not be found in findpod
+ o cmdline.t tests with different environment settings
+ o cmdline.t works now in BATCH=0 mode
version 0.9934
o Fixed fulltext search on Debian machines (different index
Modified: branches/upstream/libtk-pod-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/META.yml?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/META.yml (original)
+++ branches/upstream/libtk-pod-perl/current/META.yml Thu Aug 2 07:43:29 2007
@@ -1,8 +1,11 @@
-# http://module-build.sourceforge.net/META-spec.html
+meta-spec:
+ version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
name: Tk-Pod
-version: 0.9934
-version_from:
-installdirs: site
+version: 0.9935
+abstract: Pod browser widget for Tk
+author:
+ - Slaven Rezic <srezic at cpan.org>
requires:
File::Temp: 0
Pod::Simple: 0
@@ -16,3 +19,5 @@
resources:
bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Tk-Pod
license: http://dev.perl.org/licenses/
+ repository: http://sourceforge.net/cvs/?group_id=91459
+generated_by: Slaven Rezic
Modified: branches/upstream/libtk-pod-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/Makefile.PL?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Makefile.PL (original)
+++ branches/upstream/libtk-pod-perl/current/Makefile.PL Thu Aug 2 07:43:29 2007
@@ -2,7 +2,7 @@
use ExtUtils::MakeMaker;
-$DIST_VERSION = "0.9934";
+$DIST_VERSION = "0.9935";
$is_devel_host = defined $ENV{USER} && $ENV{USER} eq 'eserte' && $^O =~ /bsd/i && -f "../../perl.release.mk";
if ($is_devel_host) {
open(P, "Pod.pm") or die "Can't open Pod.pm: $!";
Modified: branches/upstream/libtk-pod-perl/current/Pod.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/Pod.pm?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Pod.pm (original)
+++ branches/upstream/libtk-pod-perl/current/Pod.pm Thu Aug 2 07:43:29 2007
@@ -4,8 +4,8 @@
use Tk::Toplevel;
use vars qw($VERSION $DIST_VERSION @ISA);
-$VERSION = sprintf("%d.%02d", q$Revision: 5.16 $ =~ /(\d+)\.(\d+)/);
-$DIST_VERSION = "0.9934";
+$VERSION = sprintf("%d.%02d", q$Revision: 5.17 $ =~ /(\d+)\.(\d+)/);
+$DIST_VERSION = "0.9935";
@ISA = qw(Tk::Toplevel);
Modified: branches/upstream/libtk-pod-perl/current/Pod/FindPods.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/Pod/FindPods.pm?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Pod/FindPods.pm (original)
+++ branches/upstream/libtk-pod-perl/current/Pod/FindPods.pm Thu Aug 2 07:43:29 2007
@@ -1,7 +1,7 @@
# -*- perl -*-
#
-# $Id: FindPods.pm,v 5.6 2007/05/10 20:11:09 eserte Exp $
+# $Id: FindPods.pm,v 5.7 2007/07/27 20:25:25 eserte Exp $
# Author: Slaven Rezic
#
# Copyright (C) 2001,2003,2004,2005,2007 Slaven Rezic. All rights reserved.
@@ -38,7 +38,7 @@
@EXPORT_OK = qw/%pods $has_cache pod_find/;
-$VERSION = sprintf("%d.%02d", q$Revision: 5.6 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 5.7 $ =~ /(\d+)\.(\d+)/);
BEGIN { # Make a DEBUG constant very first thing...
if(defined &DEBUG) {
@@ -145,6 +145,8 @@
$pods{$args{-category}} = {};
}
+ my $duplicate_warning_header_seen = 0;
+
my $wanted = sub {
if (-d) {
if ($seen_dir{$File::Find::name}) {
@@ -177,7 +179,13 @@
my($ext1) = $hash->{$name} =~ /\.(.*)$/;
my($ext2) = $File::Find::name =~ /\.(.*)$/;
if ($ext1 eq $ext2) {
- warn "Pod with same name (" . basename($hash->{$name}) . ") at different locations found: $hash->{$name} and $File::Find::name.\n";
+ (my $modname = $name) =~ s{/}{::}g;
+ if (!$duplicate_warning_header_seen) {
+ $duplicate_warning_header_seen = 1;
+ warn "*** Pod(s) with same name at different locations found: ***\n";
+ }
+ (my $hash_name_without_scheme = $hash->{$name}) =~ s{^file:}{};
+ warn " $modname:\n $hash_name_without_scheme\n $File::Find::name\n";
return;
}
}
@@ -242,6 +250,10 @@
foreach my $inc (@script_dirs) {
find({ %opts, wanted => $wanted_scripts }, $inc);
+ }
+
+ if ($duplicate_warning_header_seen) {
+ warn "*** This was the list of Pod(s) with same name at different locations. ***\n";
}
$self->{pods} = \%pods;
Modified: branches/upstream/libtk-pod-perl/current/Pod/Text.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/Pod/Text.pm?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Pod/Text.pm (original)
+++ branches/upstream/libtk-pod-perl/current/Pod/Text.pm Thu Aug 2 07:43:29 2007
@@ -26,7 +26,7 @@
use vars qw($VERSION @ISA @POD $IDX
@tempfiles @gv_pids $terminal_fallback_warn_shown);
-$VERSION = sprintf("%d.%02d", q$Revision: 5.11 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 5.12 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Tk::Frame Tk::Pod::SimpleBridge Tk::Pod::Cache);
@@ -129,7 +129,7 @@
-title => "Tk::Pod Error",
-message => "Can't find Pod '$name'\n"
);
- die;
+ die "Can't find Pod '$name' in @POD\n";
}
if (eval { require File::Spec; File::Spec->can("rel2abs") }) {
DEBUG and warn "Turn $absname into an absolute file name";
Modified: branches/upstream/libtk-pod-perl/current/TODO
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/TODO?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/TODO (original)
+++ branches/upstream/libtk-pod-perl/current/TODO Thu Aug 2 07:43:29 2007
@@ -51,6 +51,11 @@
Paragraphs after bullet and number items do not align correctly.
Tweaking the _indent functionality in Tk::Pod::SimpleBridge seems to
be necessary.
+
+=item *
+
+If .pod and .pm are located in separated directories, then the wrong
+file (the .pm) might be chosen. Seen on Debian with IO::Handle.
=back
Modified: branches/upstream/libtk-pod-perl/current/t/cmdline.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/t/cmdline.t?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/t/cmdline.t (original)
+++ branches/upstream/libtk-pod-perl/current/t/cmdline.t Thu Aug 2 07:43:29 2007
@@ -2,7 +2,7 @@
# -*- perl -*-
#
-# $Id: cmdline.t,v 1.6 2007/01/27 19:58:54 eserte Exp $
+# $Id: cmdline.t,v 1.7 2007/07/27 20:31:51 eserte Exp $
# Author: Slaven Rezic
#
@@ -21,8 +21,8 @@
print "1..0 # skip: no Test::More and/or POSIX module\n";
exit;
}
- if ($ENV{BATCH} || $^O eq 'MSWin32') {
- print "1..0 # skip: not on Windows or in BATCH mode\n";
+ if ($^O eq 'MSWin32') {
+ print "1..0 # skip: not on Windows\n"; # XXX but why?
exit;
}
}
@@ -32,8 +32,11 @@
my $blib = File::Spec->rel2abs("$FindBin::RealBin/../blib");
my $script = "$blib/script/tkpod";
-GetOptions("d|debug" => \$DEBUG)
- or die "usage: $0 [-debug]";
+my $batch_mode = defined $ENV{BATCH} ? $ENV{BATCH} : 1;
+
+GetOptions("d|debug" => \$DEBUG,
+ "batch!" => \$batch_mode)
+ or die "usage: $0 [-debug] [-nobatch]";
# Create test directories/files:
my $testdir = tempdir("tkpod_XXXXXXXX", TMPDIR => 1, CLEANUP => 1);
@@ -46,12 +49,23 @@
{
open my $fh, ">", $cpanfile
or die "Cannot create $cpanfile: $!";
- print $fh "=pod\nTest\n=cut\n";
+ print $fh "=pod\n\nTest\n\n=cut\n";
close $fh
or die "While closing: $!";
}
-my @opt = (['-tk'],
+my $obscurepod = "ThisFileReallyShouldNotExistInAPerlDistroXYZfooBAR";
+my $obscurefile = "$testdir/$obscurepod.pod";
+{
+ open my $fh, ">", $obscurefile
+ or die "Cannot create $obscurefile: $!";
+ print $fh "=pod\n\nThis is: $obscurepod\n\n=cut\n";
+ close $fh
+ or die "While closing: $!";
+}
+
+my @opt = (
+ ['-tk'],
['-tree','-geometry','+0+0'],
['-notree'],
['-Mblib'],
@@ -64,6 +78,13 @@
'-xrm', '*monospaceFont: {nimbus mono l}',
],
[$script], # the pod of tkpod itself
+
+ # Environment settings
+ ['-tree', '__ENV__', TKPODCACHE => "$testdir/pods_%v_%o_%u"],
+ ['__ENV__', TKPODDEBUG => 1],
+ ['__ENV__', TKPODEDITOR => 'ptked'],
+ [$obscurepod.".pod", '__ENV__', TKPODDIRS => $testdir],
+
# This should be near end...
['__ACTION__', chdir => $testdir ],
["CPAN"],
@@ -84,32 +105,72 @@
next;
}
- my $pid = fork;
- if ($pid == 0) {
- my @cmd = ($^X, "-Mblib=$blib", $script, "-geometry", "+10+10", @$opt);
- warn "@cmd\n" if $DEBUG;
+ local %ENV = %ENV;
+ delete $ENV{$_} for qw(TKPODCACHE TKPODDEBUG TKPODDIRS TKPODEDITOR);
+
+ my @this_opts;
+ my @this_env;
+ for(my $i = 0; $i<=$#$opt; $i++) {
+ if ($opt->[$i] eq '__ENV__') {
+ $ENV{$opt->[$i+1]} = $opt->[$i+2];
+ push @this_env, $opt->[$i+1]."=".$opt->[$i+2];
+ $i+=2;
+ } else {
+ push @this_opts, $opt->[$i];
+ }
+ }
+
+ my $testname = "Trying tkpod with @this_opts";
+ if (@this_env) {
+ $testname .= ", environment " . join(", ", @this_env);
+ }
+
+ if ($batch_mode) {
+ my $pid = fork;
+ if ($pid == 0) {
+ run_tkpod(\@this_opts);
+ }
+ for (1..10) {
+ select(undef,undef,undef,0.05);
+ my $kid = waitpid($pid, WNOHANG);
+ if ($kid) {
+ is($?, 0, $testname);
+ next OPT;
+ }
+ }
+ kill TERM => $pid;
+ for (1..10) {
+ select(undef,undef,undef,0.05);
+ if (!kill 0 => $pid) {
+ pass($testname);
+ next OPT;
+ }
+ }
+ kill KILL => $pid;
+ pass($testname);
+ } else {
+ run_tkpod(\@this_opts);
+ pass($testname);
+ }
+}
+
+sub run_tkpod {
+ my $this_opts_ref = shift;
+ my @cmd = ($^X, "-Mblib=$blib", $script, "-geometry", "+10+10", @$this_opts_ref);
+ warn "@cmd\n" if $DEBUG;
+ if ($batch_mode) {
open(STDERR, ">" . File::Spec->devnull) unless $DEBUG;
exec @cmd;
die $!;
- }
- for (1..10) {
- select(undef,undef,undef,0.1);
- my $kid = waitpid($pid, WNOHANG);
- if ($kid) {
- is($?, 0, "Trying tkpod with @$opt");
- next OPT;
+ } else {
+ system @cmd;
+ if ($? == 2) {
+ die "Aborted by user...\n";
+ }
+ if ($? != 0) {
+ warn "<@cmd> failed with status code <$?>";
}
}
- kill TERM => $pid;
- for (1..10) {
- select(undef,undef,undef,0.1);
- if (!kill 0 => $pid) {
- pass("Trying tkpod with @$opt");
- next OPT;
- }
- }
- kill KILL => $pid;
- pass("Trying tkpod with @$opt");
}
__END__
Modified: branches/upstream/libtk-pod-perl/current/tkpod
URL: http://svn.debian.org/wsvn/branches/upstream/libtk-pod-perl/current/tkpod?rev=6228&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/tkpod (original)
+++ branches/upstream/libtk-pod-perl/current/tkpod Thu Aug 2 07:43:29 2007
@@ -3,7 +3,7 @@
use strict;
use vars qw($VERSION $tk_opt $tree $server $portfile $Mblib @I $debug);
-$VERSION = sprintf("%d.%02d", q$Revision: 5.6 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 5.7 $ =~ /(\d+)\.(\d+)/);
use IO::Socket;
@@ -83,11 +83,11 @@
### Problems under Windows... do not use it anymore
#BEGIN { eval { require Tk::FcyEntry; }; };
use Tk::Pod 4.18;
+use Tk::Pod::Text; # for findpod
use Getopt::Long;
#require Tk::ErrorDialog;
my $mw = MainWindow->new();
-eval 'use blib "/home/e/eserte/src/perl/Tk-App";require Tk::App::Debug';
my $orig_state = $mw->state; # may be iconic
$mw->withdraw;
@@ -141,6 +141,9 @@
Tk::App::Reloader::shortcut();
$use_reloader = 1;
}
+ if (eval { require Tk::App::Debug; 1 }) {
+ warn "Loaded Tk::App::Debug...\n";
+ }
}
start_server() if $server;
More information about the Pkg-perl-cvs-commits
mailing list