summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-04-20 18:28:39 +0000
committerNorbert Preining <preining@logic.at>2010-04-20 18:28:39 +0000
commit182ee4773948c0de769443b47553d7dd92dbdd30 (patch)
tree6cff88c92e80b7d9107737a87c8ad7e57de02bbe /Master/texmf
parent05f8d0158547b0198f0615e2b5dd51542ba48b41 (diff)
only load IO::String if present, otherwise give warning instead of man page
git-svn-id: svn://tug.org/texlive/trunk@17945 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui.pl19
1 files changed, 15 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui.pl
index 7454001d042..abef00cce8c 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui.pl
@@ -37,7 +37,6 @@ use Tk::HList;
use Tk::ItemStyle;
use Pod::Text;
-use IO::String;
#use TeXLive::Splashscreen;
#use Devel::Leak;
@@ -2007,9 +2006,21 @@ sub give_warning_window {
sub pod_to_text {
my $txt;
- my $io = IO::String->new($txt);
- my $parser = Pod::Text->new (sentence => 0, width => 78);
- $parser->parse_from_file("$Master/texmf/scripts/texlive/tlmgr.pl", $io);
+ eval { require IO::Stringi; };
+ if ($@) {
+ $txt = "
+The Perl Module IO::String is not available.
+Without it the documentation cannot be shown. Please install it.
+
+As an alternative use
+ tlmgr help
+on the command line.
+";
+ } else {
+ my $io = IO::String->new($txt);
+ my $parser = Pod::Text->new (sentence => 0, width => 78);
+ $parser->parse_from_file("$Master/texmf/scripts/texlive/tlmgr.pl", $io);
+ }
my $sw = $mw->Toplevel(-title => __("Help"));
$sw->transient($mw);
my $t = $sw->Scrolled("ROText", -scrollbars => "e",