-
Notifications
You must be signed in to change notification settings - Fork 580
no warnings doesn't overrule use warnings #1621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @andkCreated by [email protected]Thanks to a bugreport by Larry Virden I could track down various warnings that % perl -we ' local $VERSION; I would expect that this should be silent. Perl Info
|
From @pmqsFrom: Andreas J. Koenig [mailto:k@ak-71.mind.de] ...
Good catch! I amazed that didn't get picked up before. Here is a patch that fixes it. Paul begin 664 lexwarn.eval.patch.gz |
From @andk
Thanks, Paul. Amazing new tests, and All tests successful. |
From @gsarOn Thu, 30 Mar 2000 13:38:08 +0200, "Andreas J. Koenig" wrote:
Try this patch. Sarathy Inline Patch-----------------------------------8<-----------------------------------
Change 5934 by gsar@auger on 2000/04/24 17:16:54
propagate lexical warnings from surrounding scope correctly
within string eval()
Affected files ...
... //depot/perl/pp_ctl.c#198 edit
... //depot/perl/t/pragma/warn/pp_ctl#11 edit
Differences ...
==== //depot/perl/pp_ctl.c#198 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c.~1~ Mon Apr 24 10:16:59 2000
+++ perl/pp_ctl.c Mon Apr 24 10:16:59 2000
@@ -3261,9 +3261,11 @@
SAVEHINTS();
PL_hints = PL_op->op_targ;
SAVESPTR(PL_compiling.cop_warnings);
- if (!specialWARN(PL_compiling.cop_warnings)) {
- PL_compiling.cop_warnings = newSVsv(PL_compiling.cop_warnings) ;
- SAVEFREESV(PL_compiling.cop_warnings) ;
+ if (specialWARN(PL_curcop->cop_warnings))
+ PL_compiling.cop_warnings = PL_curcop->cop_warnings;
+ else {
+ PL_compiling.cop_warnings = newSVsv(PL_curcop->cop_warnings);
+ SAVEFREESV(PL_compiling.cop_warnings);
}
push_return(PL_op->op_next);
==== //depot/perl/t/pragma/warn/pp_ctl#11 (text) ====
Index: perl/t/pragma/warn/pp_ctl
--- perl/t/pragma/warn/pp_ctl.~1~ Mon Apr 24 10:16:59 2000
+++ perl/t/pragma/warn/pp_ctl Mon Apr 24 10:16:59 2000
@@ -214,4 +214,17 @@
{ bless ['A'], 'Foo' for 1..10 }
{ bless ['B'], 'Foo' for 1..10 }
EXPECT
-
+########
+# pp_ctl.c
+use warnings;
+eval 'print $foo';
+EXPECT
+Use of uninitialized value in print at (eval 1) line 1.
+########
+# pp_ctl.c
+use warnings;
+{
+ no warnings;
+ eval 'print $foo';
+}
+EXPECT
End of Patch. |
From @gsarOn Mon, 24 Apr 2000 10:25:08 PDT, I wrote:
Wups, I missed the same fix that Paul had sent due to the different subject Sarathy |
From @pmqsFrom: Gurusamy Sarathy [mailto:gsar@ActiveState.com]
Thanks Sarathy. Paul |
Migrated from rt.perl.org#2859 (status was 'resolved')
Searchable as RT2859$
The text was updated successfully, but these errors were encountered: