I noticed that a lot of sripts and packages import
TransTractor::VERSION. However I don't see this variable being used
anywhere. I suspect it was needed before the Common.pm module and its
show_version() function were added.
So I modified the scripts and removed these $VERSION variables. In the
msgsearch script I also modified the show_version() implementation to
reuse the one from Common.pm. This is in po4a-20050528-version1.diff.
I made a second patch for the modules because they not only import
TransTractor::VERSION., they also reexport it though I could not see it
used anywhere. I'll also note that not all of the modules do this (for
instance Sgml.pm does not). But just incase this was by design I put
this change in a separate patch: po4a-20050528-version2.diff.
I used po4a with these two changes and did not notice any negative effect.
po4a-20050528-version1.diff - Changelog:
* msgsearch
po4a
po4a-gettextize
po4a-normalize
po4a-translate
po4a-updatepo
Francois Gouget <fgouget(a)codeweavers.com>
Remove unneeded imports of TransTractor::VERSION.
po4a-20050528-version2.diff - Changelog:
* lib/Locale/Po4a/KernelHelp.pm
lib/Locale/Po4a/Man.pm
lib/Locale/Po4a/Po.pm
lib/Locale/Po4a/Pod.pm
lib/Locale/Po4a/TeX.pm
Francois Gouget <fgouget(a)codeweavers.com>
Remove unneeded imports and exports of TransTractor::VERSION.
--
Francois Gouget
fgouget(a)codeweavers.com
Index: msgsearch
===================================================================
RCS file: /cvsroot/po4a/po4a/msgsearch,v
retrieving revision 1.6
diff -u -p -r1.6 msgsearch
--- msgsearch 27 Feb 2005 22:56:00 -0000 1.6
+++ msgsearch 28 May 2005 18:12:03 -0000
@@ -9,7 +9,6 @@ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}
# This program is free software; you can redistribute it and/or modify it
# under the terms of GPL (see COPYING).
-my $VERSION=$Locale::Po4a::TransTractor::VERSION;
=head1 NAME
@@ -143,15 +142,8 @@ use warnings;
textdomain('po4a');
sub show_version {
- print sprintf(gettext(
- "%s version %s.\n".
- "written by Martin Quinson and Denis Barbier.\n\n".
- "Copyright (C) 2002, 2003, 2004 Software of Public Interest,
Inc.\n".
- "This is free software; see source code for copying\n".
- "conditions. There is NO warranty; not even for\n".
- "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
- ), "msgsearch", $VERSION)."\n";
+ Locale::Po4a::Common::show_version("msgsearch");
exit 0;
}
my ($help,@verbose,$input,$output);
Index: po4a
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a,v
retrieving revision 1.28
diff -u -p -r1.28 po4a
--- po4a 24 Apr 2005 01:09:24 -0000 1.28
+++ po4a 28 May 2005 18:12:03 -0000
@@ -10,8 +10,6 @@ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}
# This program is free software; you can redistribute it and/or modify it
# under the terms of GPL (see COPYING).
-my $VERSION=$Locale::Po4a::TransTractor::VERSION;
-
=head1 NAME
po4a - update both the po files and translated documents in one shot
Index: po4a-gettextize
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-gettextize,v
retrieving revision 1.31
diff -u -p -r1.31 po4a-gettextize
--- po4a-gettextize 25 May 2005 16:34:06 -0000 1.31
+++ po4a-gettextize 28 May 2005 18:12:04 -0000
@@ -10,8 +10,6 @@ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}
# This program is free software; you can redistribute it and/or modify it
# under the terms of GPL (see COPYING).
-my $VERSION=$Locale::Po4a::TransTractor::VERSION;
-
=head1 NAME
po4a-gettextize - convert an original file (and its translation) to a po file
Index: po4a-normalize
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-normalize,v
retrieving revision 1.25
diff -u -p -r1.25 po4a-normalize
--- po4a-normalize 25 May 2005 16:34:06 -0000 1.25
+++ po4a-normalize 28 May 2005 18:12:04 -0000
@@ -10,8 +10,6 @@ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}
# This program is free software; you can redistribute it and/or modify it
# under the terms of GPL (see COPYING).
-my $VERSION=$Locale::Po4a::TransTractor::VERSION;
-
=head1 NAME
po4a-normalize - normalize a documentation file by parsing it in po4a, and writing it
back
Index: po4a-translate
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-translate,v
retrieving revision 1.37
diff -u -p -r1.37 po4a-translate
--- po4a-translate 25 May 2005 16:34:13 -0000 1.37
+++ po4a-translate 28 May 2005 18:12:04 -0000
@@ -10,8 +10,6 @@ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}
# This program is free software; you can redistribute it and/or modify it
# under the terms of GPL (see COPYING).
-my $VERSION=$Locale::Po4a::TransTractor::VERSION;
-
=head1 NAME
po4a-translate - convert a po file back to documentation format
Index: po4a-updatepo
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-updatepo,v
retrieving revision 1.34
diff -u -p -r1.34 po4a-updatepo
--- po4a-updatepo 25 May 2005 16:34:13 -0000 1.34
+++ po4a-updatepo 28 May 2005 18:12:04 -0000
@@ -10,8 +10,6 @@ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}
# This program is free software; you can redistribute it and/or modify it
# under the terms of GPL (see COPYING).
-my $VERSION=$Locale::Po4a::TransTractor::VERSION;
-
=head1 NAME
po4a-updatepo - update the translation (in po format) of documentation
Index: lib/Locale/Po4a/KernelHelp.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/KernelHelp.pm,v
retrieving revision 1.12
diff -u -p -r1.12 KernelHelp.pm
--- lib/Locale/Po4a/KernelHelp.pm 27 Feb 2005 22:53:52 -0000 1.12
+++ lib/Locale/Po4a/KernelHelp.pm 28 May 2005 18:12:04 -0000
@@ -24,8 +24,7 @@ use warnings;
require Exporter;
-use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);
-$VERSION=$Locale::Po4a::TransTractor::VERSION;
+use vars qw(@ISA @EXPORT $AUTOLOAD);
@ISA = qw(Locale::Po4a::TransTractor);
@EXPORT = qw(); # new process write read writepo readpo);
Index: lib/Locale/Po4a/Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.91
diff -u -p -r1.91 Man.pm
--- lib/Locale/Po4a/Man.pm 25 May 2005 14:12:30 -0000 1.91
+++ lib/Locale/Po4a/Man.pm 28 May 2005 18:12:05 -0000
@@ -274,8 +274,7 @@ use strict;
use warnings;
require Exporter;
-use vars qw($VERSION @ISA @EXPORT);
-$VERSION=$Locale::Po4a::TransTractor::VERSION;
+use vars qw(@ISA @EXPORT);
@ISA = qw(Locale::Po4a::TransTractor);
@EXPORT = qw();# new initialize);
use Locale::Po4a::TransTractor;
Index: lib/Locale/Po4a/Po.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Po.pm,v
retrieving revision 1.41
diff -u -p -r1.41 Po.pm
--- lib/Locale/Po4a/Po.pm 3 Apr 2005 21:15:22 -0000 1.41
+++ lib/Locale/Po4a/Po.pm 28 May 2005 18:12:06 -0000
@@ -57,8 +57,7 @@ require Exporter;
use warnings;
use subs qw(makespace);
-use vars qw($VERSION @ISA @EXPORT);
-$VERSION=$Locale::Po4a::TransTractor::VERSION;
+use vars qw(@ISA @EXPORT);
@ISA = ();
@EXPORT = qw(load write gettext);
Index: lib/Locale/Po4a/Pod.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Pod.pm,v
retrieving revision 1.16
diff -u -p -r1.16 Pod.pm
--- lib/Locale/Po4a/Pod.pm 27 Feb 2005 22:53:53 -0000 1.16
+++ lib/Locale/Po4a/Pod.pm 28 May 2005 18:12:06 -0000
@@ -23,8 +23,7 @@ use warnings;
require Exporter;
-use vars qw($VERSION @ISA);
-$VERSION=$Locale::Po4a::TransTractor::VERSION;
+use vars qw(@ISA);
@ISA = qw(Locale::Po4a::TransTractor Pod::Parser);
sub initialize {}
Index: lib/Locale/Po4a/TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.58
diff -u -p -r1.58 TeX.pm
--- lib/Locale/Po4a/TeX.pm 23 Apr 2005 17:41:34 -0000 1.58
+++ lib/Locale/Po4a/TeX.pm 28 May 2005 18:12:07 -0000
@@ -68,8 +68,7 @@ use strict;
use warnings;
require Exporter;
-use vars qw($VERSION @ISA @EXPORT);
-$VERSION=$Locale::Po4a::TransTractor::VERSION;
+use vars qw(@ISA @EXPORT);
@ISA = qw(Locale::Po4a::TransTractor);
@EXPORT = qw(%commands %environments
$RE_ESCAPE $ESCAPE