bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix perl scripts for perl -c


From: Alexey Gladkov
Subject: Fix perl scripts for perl -c
Date: Thu, 21 Aug 2008 01:21:58 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.8.1.14) Gecko/20080717 Thunderbird/2.0.0.14 Mnenhy/0.7.5.0

Greetings!

Script groffer.pl failed perl syntax check:

perl -c /tmp/groffer.pl
/tmp/split_env.sh does not exist; at /tmp/groffer.pl line 151.
BEGIN failed--compilation aborted at /tmp/groffer.pl line 167.

Do not keep application specific code inside BEGIN block. BEGIN is run when you use the -c switch for a syntax check.

http://perldoc.perl.org/perlmod.html#BEGIN,-UNITCHECK,-CHECK,-INIT-and-END

--
Rgrds, legion
--- groff-1.19.3/contrib/chem/chem.pl.fix       2008-08-21 00:42:27 +0400
+++ groff-1.19.3/contrib/chem/chem.pl   2008-08-21 00:42:38 +0400
@@ -59,9 +59,9 @@ my $Chem_Name;
 my $Groff_Version;
 my $File_chem_pic;
 my $File_pic_tmac;
 
-BEGIN {
+{
   {
     my $before_make;           # script before run of `make'
     {
       my $at = '@';
--- groff-1.19.3/contrib/groffer/perl/groffer.pl.fix    2008-08-21 00:42:10 
+0400
+++ groff-1.19.3/contrib/groffer/perl/groffer.pl        2008-08-21 00:42:46 
+0400
@@ -85,9 +85,9 @@ our $Special_Filespec;
 our $Special_Setup;
 
 our %Man;
 
-BEGIN {
+{
   $Dev_Null = File::Spec->devnull();
 
   $Umask = umask 077;
 
@@ -105,9 +105,9 @@ BEGIN {
 our $File_split_env_sh;
 our $File_version_sh;
 our $Groff_Version;
 
-BEGIN {
+{
   {
     my $before_make;           # script before run of `make'
     {
       my $at = '@';
--- groff-1.19.3/ChangeLog.fix  2008-08-21 00:57:08 +0400
+++ groff-1.19.3/ChangeLog      2008-08-21 00:55:24 +0400
@@ -1,5 +1,10 @@
 2008-08-21  Alexey Gladkov  <address@hidden>
+       * contrib/groffer/perl/groffer.pl, contrib/chem/chem.pl: Do not
+       keep application specific code inside BEGIN block. BEGIN is run
+       when you use the -c switch for a syntax check.
+
+2008-08-21  Alexey Gladkov  <address@hidden>
        * contrib/groffer/perl/roff2.pl: Fix syntax error.
 
 2008-08-20  Alexey Gladkov  <address@hidden> 
            Werner LEMBERG  <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]