Bug#200264: tetex's dependencies on texdoctk, dvipdfm, perl-tk
On 20.04.04 Julian Gilbey (jdg@polya.uklinux.net) wrote:
Hi Julian,
I'm just a perl beginner. Excuse me to ask questions.
> --- /tmp/texdoctk.orig 2004-04-20 22:10:43.000000000 +0100
> +++ /tmp/texdoctk 2004-04-20 22:18:13.000000000 +0100
> @@ -9,9 +7,20 @@
> # disclaimer.
> ###############################################################################
> use strict;
> -use Tk;
> use Getopt::Long;
> Getopt::Long::config('bundling');
> +use Tk;
>
Isn't that use surplus, as the loading of the Tk-Module is done using
"require" and "import"?
> +BEGIN {
> + eval { require Tk; import Tk; };
> + if ($@) {
> + my $progname = basename($0);
> + if ($@ =~ /^Can\'t locate Tk\.pm/) {
> + die "$progname: you must have the perl-tk package installed\nto use this script\n";
> + } else {
> + die "$progname: problem loading the Tk module:\n $@\nHave you installed the perl-tk package?\n";
> + }
> + }
> +}
>
I see, that you're differing between two cases. However I don't see
any sense in doing that, as it should be sufficient to evaluate the
exit status of the require-import command, which is done before.
What am I missing?
In general the solution sounds good, however I still prefer a
message, which is visible even if texdoctk was started using the
Debian-menu system.... just to prevent lame bug reports.
Hilmar
--
sigmentation fault
Reply to: