develooper Front page | perl.perl5.porters | Postings from February 2008

Re: [perl #50706] %^H affecting outside file scopes

Thread Previous | Thread Next
From:
Rick Delaney
Date:
February 12, 2008 11:05
Subject:
Re: [perl #50706] %^H affecting outside file scopes
Message ID:
20080212190522.GB16896@bort.ca
On Feb 10 2008, Rick Delaney wrote:
> # New Ticket Created by  Rick Delaney 
> # Please include the string:  [perl #50706]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=50706 >
> 
> 
> =head1 SYNOPSIS
> 
>     use mypragma;
>     use SomeModule; # (caller(0))[10]{mypragma} is wrongly true inside

The patch after my .sig fixes this and all tests pass but I'm not
confident that I completely understand the whole pragma mechanism so
please think about the ramifications that I didn't.  :-)

-- 
Rick Delaney
rick@bort.ca


diff -pruN perl-current/pp_ctl.c perl-current-dev/pp_ctl.c
--- perl-current/pp_ctl.c	2008-02-12 08:16:57.000000000 -0500
+++ perl-current-dev/pp_ctl.c	2008-02-12 13:52:23.000000000 -0500
@@ -3564,6 +3564,8 @@ PP(pp_require)
 
     SAVEHINTS();
     PL_hints = 0;
+    PL_compiling.cop_hints_hash = NULL;
+
     SAVECOMPILEWARNINGS();
     if (PL_dowarn & G_WARN_ALL_ON)
         PL_compiling.cop_warnings = pWARN_ALL ;

Thread Previous | 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