aboutsummaryrefslogtreecommitdiffstats
path: root/copypage.pl
diff options
context:
space:
mode:
authorMarcin Owsiany <porridge>2010-11-03 18:26:41 +0000
committerMarcin Owsiany <porridge>2010-11-03 18:26:41 +0000
commit95f6b83f9fe0e7dfd32b7bbeed65532f1cfa42ff (patch)
treea3446b05427e5844e6948d56ef335af5787db776 /copypage.pl
parent4ea8a7290a61dd76e8c9b8443e2cf053a5480a95 (diff)
Declare options before using them. Give the usage message a chance to display.
CVS version numbers copypage.pl: 1.38 -> 1.39
Diffstat (limited to 'copypage.pl')
-rwxr-xr-xcopypage.pl20
1 files changed, 10 insertions, 10 deletions
diff --git a/copypage.pl b/copypage.pl
index 05e9dc4491d..1c28e7f8400 100755
--- a/copypage.pl
+++ b/copypage.pl
@@ -61,6 +61,10 @@ if (exists $ENV{DWWW_MAINT})
$maintainer = $ENV{DWWW_MAINT};
}
+# Options
+our ($opt_n, $opt_t, $opt_l);
+getopts('nm:l:');
+
# Values overwritten by commandline
if (defined $opt_m)
{
@@ -71,13 +75,6 @@ if (defined $opt_l)
$language = $opt_l;
}
-die "Language not defined in DWWW_LANG or language.conf\n"
- if not defined $language;
-
-#warn "Maintainer name not defined in DWWW_MAINT or language.conf\n"
-# if not defined $maintainer;
-
-
# Check usage.
if ($#ARGV == -1)
{
@@ -103,9 +100,12 @@ if ($#ARGV == -1)
}
-# Options
-our ($opt_n, $opt_t, $opt_l);
-getopts('nm:l:');
+die "Language not defined in DWWW_LANG or language.conf\n"
+ if not defined $language;
+
+#warn "Maintainer name not defined in DWWW_MAINT or language.conf\n"
+# if not defined $maintainer;
+
# Table of entities used when copying to non-latin1 encodings
@entities = (

© 2014-2024 Faster IT GmbH | imprint | privacy policy