On Wed, 27 Feb 2002, Ask Bjoern Hansen wrote:

> On Wed, 27 Feb 2002, Doug MacEachern wrote:
> 
> > pretty sure this due to patch #12251
> > that is supposed to be backed out or changed, robin barker was
> > working on it.
> 
> Hmn.

12251 was never backed out.  Reverse applying it to perl@14870 makes
at least this problem go away and the httpd start.  There were still
some failed (mod_perl) tests, but no time to look at that now.


 - ask
 
> ------- Start of forwarded message -------
> Newsgroups: perl.perl5.porters
> To: Robin Barker <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED], Doug MacEachern <[EMAIL PROTECTED]>,
>         Jarkko Hietaniemi <[EMAIL PROTECTED]>
> Subject: 12251 broke modperl (Was: [PATCH gv.c] make __ANON__ global)
> References: <[EMAIL PROTECTED]>
> Date: 02 Jan 2002 14:20:07 +0100
> Message-ID: <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> From: [EMAIL PROTECTED] (Andreas J. Koenig)
> 
> >>>>> On Wed, 26 Sep 2001 17:56:28 +0100 (BST), Robin Barker <[EMAIL PROTECTED]> 
>said:
> 
>   > I know C<package;> is deprecated but this error confused me.
>   >   % ./perl -e 'package; sub {}'
>   >   Global symbol "__ANON__" requires explicit package name at -e line 1.
>   >   Execution of -e aborted due to compilation errors.
> 
>   > It looks as if __ANON__ should be global, anyway.  So that it is what
>   > the attached patch does.  If this is the wrong approach tell me. :-)
> 
> This is the wrong approach, Robin! :-)
> 
> It broke mod_perl, more precisely Apache::Constants which treats
> AUTOLOAD in XSUB *and* perl. In perl it has this code:
> 
>     *AUTOLOAD  = sub {
>         if (defined &__AUTOLOAD) { #make extra sure we don't recurse
>             #why must we stringify first???
>             __AUTOLOAD() if "$Apache::Constants::AUTOLOAD";
>             goto &$Apache::Constants::AUTOLOAD;
>         }
>         else {
>             require Carp;
>             Carp::confess("__AUTOLOAD is undefined, ",
>                           "trying to AUTOLOAD $Apache::Constants::AUTOLOAD");
>         }
>     };
> 
> 
> which now fails with
> 
>     Unable to create sub named "" at 
>/root/.cpan/build/mod_perl-1.26/blib/lib/Apache/Constants.pm line 23.
> 
> I hope you and Doug can agree on which side needs to fix this. I'll
> back out 12251 for myself.
> 
> Jarkko, if you've read so far, please consider: wouldn't you think
> that a 5.7.3 could help to spot such breakages. I think of 5.7.3 as an
> en-passant-dev-release and not a stable-release-candidate. Something
> that enters CPAN and can be regarded as a milestone for the curious
> without the pressure to prepare 5.8.0.
> 
> 

-- 
ask bjoern hansen, http://ask.netcetera.dk/         !try; do();
more than a billion impressions per week, http://valueclick.com

--- perl/gv.c.~1~       Thu Sep 27 17:00:06 2001
+++ perl/gv.c   Thu Sep 27 17:00:06 2001
@@ -656,7 +656,7 @@
                  strEQ(name, "ARGVOUT")))
                    global = TRUE;
            }
-           else if (*name == '_' && !name[1])
+           else if (*name == '_' && (!name[1] || strEQ(name,"__ANON__")))
                global = TRUE;
 
            if (global)

--- perl/t/op/anonsub.t.~1~     Thu Sep 27 17:00:06 2001
+++ perl/t/op/anonsub.t Thu Sep 27 17:00:06 2001
@@ -97,3 +97,8 @@
 X();
 EXPECT
 ok 1
+########
+package;
+print sub { return "ok 1\n" } -> ();
+EXPECT
+ok 1

--- perl/t/op/runlevel.t.~1~    Thu Sep 27 17:00:06 2001
+++ perl/t/op/runlevel.t        Thu Sep 27 17:00:06 2001
@@ -311,6 +311,7 @@
 eval { die };
 &{sub { eval 'die' }}();
 sub foo { eval { die } } foo();
+{package rmb; sub{ eval{die} } ->() }; # check __ANON__ is global      
 EXPECT
 In DIE
 main|-|8|(eval)
@@ -320,6 +321,9 @@
 In DIE
 main|-|10|(eval)
 main|-|10|main::foo
+In DIE
+rmb|-|11|(eval)
+rmb|-|11|main::__ANON__
 ########
 package TEST;
  
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to