r23459 - in /branches/upstream/libtk-pod-perl/current: Changes META.yml Makefile.PL Pod.pm Pod/Search.pm Pod/Text.pm Pod/WWWBrowser.pm README TODO t/TkTest.pm t/basic.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Mon Jul 21 20:20:44 UTC 2008
Author: gregoa
Date: Mon Jul 21 20:20:41 2008
New Revision: 23459
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23459
Log:
[svn-upgrade] Integrating new upstream version, libtk-pod-perl (0.9939)
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/Search.pm
branches/upstream/libtk-pod-perl/current/Pod/Text.pm
branches/upstream/libtk-pod-perl/current/Pod/WWWBrowser.pm
branches/upstream/libtk-pod-perl/current/README
branches/upstream/libtk-pod-perl/current/TODO
branches/upstream/libtk-pod-perl/current/t/TkTest.pm
branches/upstream/libtk-pod-perl/current/t/basic.t
Modified: branches/upstream/libtk-pod-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/Changes?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Changes (original)
+++ branches/upstream/libtk-pod-perl/current/Changes Mon Jul 21 20:20:41 2008
@@ -1,4 +1,24 @@
History for Tk::Pod
+
+version 0.9939
+ o new popup menu item "Copy Pod location"
+
+version 0.9938_52
+ o fixed some tests caused by the new optionality of some
+ modules
+
+version 0.9938_51
+ o META.yml needs also dynamic_config setting
+ o update of README
+
+version 0.9938_50
+ o update to newest WWWBrowser.pm
+ o again fixes for fulltext search paths (problems seen on Debian
+ and Windows)
+ o debug mode: now with Reloader menu item
+ o META.yml uses optional_features instead of recommends
+ o changed DISPLAY check before test_harness call, hopefully
+ generating UNKNOWN test results
version 0.9938 So 3 Feb 2008 19:12:04 CET
o The internal man viewer can handle utf-8 now.
Modified: branches/upstream/libtk-pod-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/META.yml?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/META.yml (original)
+++ branches/upstream/libtk-pod-perl/current/META.yml Mon Jul 21 20:20:41 2008
@@ -2,7 +2,7 @@
version: 1.3
url: http://module-build.sourceforge.net/META-spec-v1.3.html
name: Tk-Pod
-version: 0.9938
+version: 0.9939
abstract: Pod browser widget for Tk
author:
- Slaven Rezic <srezic at cpan.org>
@@ -10,10 +10,22 @@
File::Temp: 0
Pod::Simple: 0
Tk: 800.004
-recommends:
- Text::English: 0
- Tk::HistEntry: 0.4
- Tk::ToolBar: 0
+optional_features:
+ - fulltext_search:
+ description: "Enable the full-text search"
+ requires:
+ Text::English: 0
+ - nicer_gui:
+ description: "Provide a nicer GUI"
+ requires:
+ Tk::HistEntry: 0.4
+ Tk::ToolBar: 0
+ - debugging:
+ description: "Debugging helper"
+ requires:
+ Tk::WidgetDump: 0
+ Module:Refresh: 0
+dynamic_config: 0
license: perl
distribution_type: module
resources:
Modified: branches/upstream/libtk-pod-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/Makefile.PL?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Makefile.PL (original)
+++ branches/upstream/libtk-pod-perl/current/Makefile.PL Mon Jul 21 20:20:41 2008
@@ -2,7 +2,7 @@
use ExtUtils::MakeMaker;
-$DIST_VERSION = "0.9938";
+$DIST_VERSION = "0.9939";
$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: $!";
@@ -66,6 +66,9 @@
# the following are really only COREQUISITES
'Text::English' => 0,
'Tk::HistEntry' => 0.40,
+ # Very very optional Corequisites
+ # 'Tk::WidgetDump' => 0,
+ # 'Module::Refresh' => 0,
%add_prereq_pm,
},
'DISTNAME' => 'Tk-Pod',
@@ -83,8 +86,8 @@
sub MY::test_via_harness {
my($self, $perl, $tests) = @_;
- qq{\t$perl "-It" "-MTkTest" "-MExtUtils::Command::MM" }.
- qq{"-e" "check_display_harness; test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
+ qq{\t$perl "-It" "-MTkTest" }.
+ qq{"-e" "check_display_test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
}
sub MY::postamble {
Modified: branches/upstream/libtk-pod-perl/current/Pod.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/Pod.pm?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Pod.pm (original)
+++ branches/upstream/libtk-pod-perl/current/Pod.pm Mon Jul 21 20:20:41 2008
@@ -4,8 +4,8 @@
use Tk::Toplevel;
use vars qw($VERSION $DIST_VERSION @ISA);
-$VERSION = sprintf("%d.%02d", q$Revision: 5.20 $ =~ /(\d+)\.(\d+)/);
-$DIST_VERSION = "0.9938";
+$VERSION = sprintf("%d.%02d", q$Revision: 5.25 $ =~ /(\d+)\.(\d+)/);
+$DIST_VERSION = "0.9939";
@ISA = qw(Tk::Toplevel);
@@ -259,13 +259,43 @@
? ('-',
[Button => 'WidgetDump', -command => sub { $w->WidgetDump }],
[Button => 'Ptksh', -command => sub {
+ # Code taken from bbbike
+ # Is there already a (withdrawn) ptksh?
+ foreach my $mw0 (Tk::MainWindow::Existing()) {
+ if ($mw0->title =~ /^ptksh/) {
+ $mw0->deiconify;
+ $mw0->raise;
+ return;
+ }
+ }
+
require Config;
- require $Config::Config{'scriptdir'} . "/ptksh";
+ my $perldir = $Config::Config{'scriptdir'};
+ require "$perldir/ptksh";
+
+ # Code taken from bbbike and slightly modified
+ foreach my $mw0 (Tk::MainWindow::Existing()) {
+ if ($mw0->title eq 'ptksh') {
+ $mw0->protocol('WM_DELETE_WINDOW' => [$mw0, 'withdraw']);
+ }
+ }
}],
- (defined &Tk::App::Reloader::reload_new_modules
- ? [Button => 'Reloader', -command => sub { Tk::App::Reloader::reload_new_modules() }]
- : ()
- ),
+ [Button => 'Reloader', -command => sub {
+ if (eval { require Module::Refresh; 1 }) {
+ Module::Refresh->refresh;
+ $w->messageBox(-title => "Reloader",
+ -icon => "info",
+ -message => "Modules were reloaded.",
+ );
+ } else {
+ $w->messageBox(-title => "Reloader",
+ -icon => "error",
+ -message => "To use this functionality you have to install Module::Refresh from CPAN",
+ );
+ # So we have a chance to try it again...
+ delete $INC{"Module/Refresh.pm"};
+ }
+ }],
)
: ()
),
Modified: branches/upstream/libtk-pod-perl/current/Pod/Search.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/Pod/Search.pm?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Pod/Search.pm (original)
+++ branches/upstream/libtk-pod-perl/current/Pod/Search.pm Mon Jul 21 20:20:41 2008
@@ -3,7 +3,7 @@
use strict;
use vars qw(@ISA $VERSION);
-$VERSION = sprintf("%d.%02d", q$Revision: 5.8 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 5.10 $ =~ /(\d+)\.(\d+)/);
use Carp;
use Config qw(%Config);
@@ -133,7 +133,7 @@
my $w = shift;
my $l = shift;
- my $find = $e->get;
+ my $find = ref $e eq 'Tk::BrowseEntry' ? $e->Subwidget("entry")->get : $e->get;
$w->addHistory($find) if $find ne '';
my %args;
@@ -196,7 +196,11 @@
my @inc = sort { length($b) <=> length($a) } (@INC, $Config{scriptdir});
for my $inc (@inc) {
- if (index($path, $inc) == 0) {
+ # XXX Nicer solution without hardcoded directory separators needed!
+ if (index($path, "$inc/") >= 0) {
+ return (substr($path, length($inc)+1), $inc);
+ }
+ if ($^O eq 'MSWin32' && index($path, "$inc\\") >= 0) {
return (substr($path, length($inc)+1), $inc);
}
}
Modified: branches/upstream/libtk-pod-perl/current/Pod/Text.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/Pod/Text.pm?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Pod/Text.pm (original)
+++ branches/upstream/libtk-pod-perl/current/Pod/Text.pm Mon Jul 21 20:20:41 2008
@@ -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.18 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 5.19 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Tk::Frame Tk::Pod::SimpleBridge Tk::Pod::Cache);
@@ -368,6 +368,27 @@
$more->focus;
}
+sub copy_pod_location
+{
+ my($w) = @_;
+ my $file = $w->_get_editable_path;
+ if (!defined $file)
+ {
+ $w->_error_dialog("Cannot copy location: this Pod is not associated with a file");
+ return;
+ }
+ $w->SelectionOwn;
+ $w->SelectionHandle(sub {
+ my($offset,$maxbytes) = @_;
+ # XXX It's not exactly clear why I have to
+ # call _get_editable_path again here and not
+ # reuse $file.
+ my $file = $w->_get_editable_path;
+ return undef if $offset > length($file);
+ substr($file, $offset, $maxbytes);
+ });
+}
+
sub _sgn { $_[0] cmp 0 }
sub zoom_normal {
@@ -454,6 +475,7 @@
[Button => 'Reload', -command => sub{$w->reload} ],
[Button => 'Edit Pod', -command => sub{ $w->edit_get_linenumber } ],
[Button => 'View source', -command => sub{ $w->view_source } ],
+ [Button => 'Copy Pod location', -command => sub { $w->copy_pod_location } ],
[Button => 'Search fulltext',-command => ['SearchFullText', $w]],
[Separator => ""],
[Cascade => 'Edit',
Modified: branches/upstream/libtk-pod-perl/current/Pod/WWWBrowser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/Pod/WWWBrowser.pm?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/Pod/WWWBrowser.pm (original)
+++ branches/upstream/libtk-pod-perl/current/Pod/WWWBrowser.pm Mon Jul 21 20:20:41 2008
@@ -7,7 +7,7 @@
# -*- perl -*-
#
-# $Id: WWWBrowser.pm,v 1.5 2008/01/26 11:40:14 eserte Exp $
+# $Id: WWWBrowser.pm,v 1.7 2008/07/21 06:22:56 eserte Exp $
# Author: Slaven Rezic
#
# Copyright (C) 1999,2000,2001,2003,2005,2006,2007,2008 Slaven Rezic.
@@ -28,9 +28,9 @@
use vars qw(@unix_browsers @available_browsers
@terminals @available_terminals
$VERSION $VERBOSE $initialized $os $fork
- $got_from_config $ignore_config);
-
-$VERSION = sprintf("%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/);
+ $ignore_config);
+
+$VERSION = sprintf("%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/);
@available_browsers = qw(_debian_browser _internal_htmlview
_default_gnome _default_kde
@@ -150,14 +150,14 @@
return 1;
}
} elsif ($browser eq '_internal_htmlview') {
- eval {
+ my $ret = eval {
htmlview($url);
};
if ($@) {
warn $@;
next;
- } else {
- return 1;
+ } elsif ($ret) {
+ return $ret;
}
} elsif ($browser eq '_debian_browser') {
if (-x "/usr/bin/sensible-browser") {
@@ -183,9 +183,23 @@
}
}
+ if ($^O eq 'cygwin') {
+ return 1 if start_windows_browser_cygwin($url, %args);
+ }
+
status_message("Can't find HTML viewer.", "err");
return 0;
+}
+
+sub start_windows_browser_cygwin {
+ my($url, %args) = @_;
+ system("cmd", "/c", "start", $url);
+ if ($? == 0) {
+ return 1;
+ } else {
+ return 0;
+ }
}
sub start_browser_windows {
@@ -374,7 +388,7 @@
# XXX document get_from_config, $ignore_config, ~/.wwwbrowser
sub get_from_config {
- if (!$got_from_config && !$ignore_config && $ENV{HOME} && open(CFG, "$ENV{HOME}/.wwwbrowser")) {
+ if (!$ignore_config && $ENV{HOME} && open(CFG, "$ENV{HOME}/.wwwbrowser")) {
my @browser;
while(<CFG>) {
chomp;
@@ -382,7 +396,6 @@
push @browser, $_;
}
close CFG;
- $got_from_config++;
unshift @unix_browsers, @browser;
}
}
@@ -528,6 +541,7 @@
die "No valid browser found.\n";
}
+ return 1;
}
sub open_in_terminal {
Modified: branches/upstream/libtk-pod-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/README?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/README (original)
+++ branches/upstream/libtk-pod-perl/current/README Mon Jul 21 20:20:41 2008
@@ -3,7 +3,11 @@
This is a graphical user interface for viewing and browsing perl's Pod
documentation.
-To install, type:
+To install, type
+
+ cpan .
+
+if you have a modern CPAN.pm, otherwise
perl Makefile.PL (resolve all dependencies)
make
@@ -11,20 +15,23 @@
make demo (optional)
make install
-Windows users should replace "make" with "nmake" unless using a
-cygwin-compiled or MinGW-compiled perl.
+Windows users should replace "make" with "nmake" if using ActivePerl
+or "dmake" if using Vanilla or Strawberry Perl.
-At least perl 5.005 and Tk 800.004 is required.
+At least perl 5.005 and Tk 800.004 are required.
Features include:
o A standalone Tk pod viewer: tkpod
o Interface to perlindex full text Pod search
(you need to install the perlindex distribution aka
- Text::English from CPAN).
+ Text::English from CPAN and create an index using
+ "perlindex -index").
o Supports single or multiple Pod windows.
- o Primitive Tk::More widget with '/', 'n', 'N', 'j', 'k'
+ o more/less-like Tk::More widget with '/', 'n', 'N', 'j', 'k'
bindings
o Tree view of available Pods
+ o links to URLs and man pages are also handled
+ o printing using postscript, RTF or text output
If Tk::ToolBar is installed, then tkpod may use the Tk::ToolBar icons
for the menus. This works both in Tk804 with native compounds and in
@@ -32,7 +39,7 @@
The original Tk::Pod module was written by Nick Ing-Simmons
<nik at tiuk.ti.com>. Former maintainer was Achim Bohnet. Current
-maintainer is Slaven Rezic <slaven at rezic.de>. Pod::Simple support is
+maintainer is Slaven Rezic <srezic at cpan.org>. Pod::Simple support is
by Sean Burke. Please send bug reports, patches and comments to the
current maintainer.
Modified: branches/upstream/libtk-pod-perl/current/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/TODO?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/TODO (original)
+++ branches/upstream/libtk-pod-perl/current/TODO Mon Jul 21 20:20:41 2008
@@ -102,6 +102,11 @@
Show a progress bar or an indicator when refreshing the pod index.
+=item *
+
+It would be nice if building the tree would happen in background, e.g.
+by using standard perl ipc (pipe+fork).
+
=back
=head3 Tk::More
@@ -111,6 +116,23 @@
=item *
Highlight matches in link text.
+
+=item *
+
+A menu item for switching between popular encodings. Default probably
+to iso-8859-1 or maybe user's locale.
+
+=item *
+
+A menu item (and maybe also the keyboard equivalent -x) for changing
+the indentation level.
+
+=item *
+
+If there are more configuration parameters resembling less, then maybe
+an environment variable like LESS could be useful for common
+configuration parameters. Question: should this only be valid if it's
+called as tkmore or also if embedded in Tk::Pod?
=back
Modified: branches/upstream/libtk-pod-perl/current/t/TkTest.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/t/TkTest.pm?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/t/TkTest.pm (original)
+++ branches/upstream/libtk-pod-perl/current/t/TkTest.pm Mon Jul 21 20:20:41 2008
@@ -10,9 +10,13 @@
use vars qw(@EXPORT);
use base qw(Exporter);
- at EXPORT = qw(check_display_harness);
+ at EXPORT = qw(check_display_test_harness);
-sub check_display_harness () {
+use ExtUtils::Command::MM qw(test_harness);
+
+sub check_display_test_harness {
+ my(@test_harness_args) = @_;
+
# In case of cygwin, use'ing Tk before forking (which is done by
# Test::Harness) may lead to "remap" errors, which are normally
# solved by the rebase or rebaseall utilities.
@@ -20,22 +24,27 @@
# Here, I just skip the DISPLAY check on cygwin to not force users
# to run rebase.
#
- return if $^O eq 'cygwin' || $^O eq 'MSWin32';
+ if (!($^O eq 'cygwin' || $^O eq 'MSWin32')) {
- eval q{
+ eval q{
use blib;
use Tk;
};
- die "Strange: could not load Tk library: $@" if $@;
+ die "Strange: could not load Tk library: $@" if $@;
- if (defined $Tk::platform && $Tk::platform eq 'unix') {
- my $mw = eval { MainWindow->new() };
- if (!Tk::Exists($mw)) {
- warn "Cannot create MainWindow (maybe no X11 server is running or DISPLAY is not set?)\n$@\n";
- exit 0;
+ if (defined $Tk::platform && $Tk::platform eq 'unix') {
+ my $mw = eval { MainWindow->new() };
+ if (!Tk::Exists($mw)) {
+ warn "Cannot create MainWindow (maybe no X11 server is running or DISPLAY is not set?)\n$@\n";
+ # empty the argument list for the following test_harness
+ @ARGV = ();
+ } else {
+ $mw->destroy;
+ }
}
- $mw->destroy;
}
+
+ test_harness(@test_harness_args);
}
1;
Modified: branches/upstream/libtk-pod-perl/current/t/basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtk-pod-perl/current/t/basic.t?rev=23459&op=diff
==============================================================================
--- branches/upstream/libtk-pod-perl/current/t/basic.t (original)
+++ branches/upstream/libtk-pod-perl/current/t/basic.t Mon Jul 21 20:20:41 2008
@@ -63,7 +63,7 @@
my $w;
foreach my $class (@class)
{
- print "Testing $class\n";
+ print "# Testing $class\n";
undef($w);
if ($class =~ m{^Pod(Text|Search|Tree)$})
@@ -128,9 +128,14 @@
}
}
+print "# Require all modules\n";
for my $base (@tk_pod_modules) {
eval "require Tk::Pod::$base";
- ok($@, "", "Could not require Tk::Pod::$base: $@");
+ if ($@ && $base eq 'Search_db') {
+ ok($@ =~ m{locate Text.*English}, 1, "Could not require Tk::Pod::$base: $@");
+ } else {
+ ok($@, "", "Could not require Tk::Pod::$base: $@");
+ }
}
1;
More information about the Pkg-perl-cvs-commits
mailing list