develooper Front page | perl.perl5.porters | Postings from September 2003

[PATCH 5.8.1] Unwanted "redefined" warnings in h2ph

Thread Next
From:
Kurt Starsinic
Date:
September 9, 2003 20:16
Subject:
[PATCH 5.8.1] Unwanted "redefined" warnings in h2ph
Message ID:
20030910031600.GA30554@verizon.net
Hi,

    This patch silences unnecessary warnings when requiring certain
.ph files.  This occurs when, e.g., this is encountered in .h files:

        #define FOO 1

        /* . . . . */

        #define FOO 1

    - Kurt

--- utils/h2ph.PL	2003-09-09 22:58:20.000000000 -0400
+++ utils/h2ph.PL.new	2003-09-09 23:06:11.000000000 -0400
@@ -120,7 +120,9 @@
 	open(OUT,">$Dest_dir/$outfile") || die "Can't create $outfile: $!\n";
     }
 
-    print OUT "require '_h2ph_pre.ph';\n\n";
+    print OUT
+        "require '_h2ph_pre.ph';\n\n",
+        "no warnings 'redefine';\n\n";
 
     while (defined (local $_ = next_line($file))) {
 	if (s/^\s*\#\s*//) {

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About