From 182ee4773948c0de769443b47553d7dd92dbdd30 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 20 Apr 2010 18:28:39 +0000 Subject: 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 --- Master/texmf/scripts/texlive/tlmgrgui.pl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'Master/texmf') 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", -- cgit v1.2.3