Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

8 views
Skip to first unread message

Rick Delaney

unread,
Feb 10, 2008, 9:38:02 PM2/10/08
to bugs-bi...@rt.perl.org
# 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

=head1 EXAMPLES

See attached todo test.

--
Rick Delaney
ri...@bort.ca

todo.patch

Rick Delaney

unread,
Feb 12, 2008, 2:05:22 PM2/12/08
to perl5-...@perl.org
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
ri...@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 ;

Rafael Garcia-Suarez

unread,
Feb 14, 2008, 11:31:07 AM2/14/08
to Rick Delaney, perl5-...@perl.org
On 12/02/2008, Rick Delaney <ri...@bort.ca> wrote:
> 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. :-)
>

I believe it's correct. Thanks, applied as #33311.

0 new messages