You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Colin Wetherbee <cw...@denterprises.org> on 2007/12/20 17:38:02 UTC

Perl 5.10

Have any of you used mod_perl with Perl 5.10 yet?  Are there any gotchas 
to consider?

I'm still waiting on the release of the Debian packages.

Colin

Re: Perl 5.10

Posted by Michael Schout <ms...@gkg.net>.
Colin Wetherbee wrote:
> Have any of you used mod_perl with Perl 5.10 yet?  Are there any gotchas
> to consider?

Apparently so.

I have found the cause of my sometimes-it-works sometimes-it-doesnt
problem for PerlOutputFilterHandlers.

I tracked the problem down to MP_CODE_ATTRS(), called from modperl_mgv.c
on line 276:

handler->attrs = (U32)MP_CODE_ATTRS(cv);

I added some MP_TRACE()'s around this line and found out that
MP_CODE_ATTRS(cv) returns some random looking data under 5.10. Looking
at mod_perl.h, it says:

/* betting on Perl*Handlers not using CvXSUBANY
 * mod_perl reuses this field for handler attributes
 */
#define MP_CODE_ATTRS(cv) (CvXSUBANY((CV*)cv).any_i32)

This must not be a safe bet under perl 5.10.0.  I have no idea what to
do as an alternative.  I don't know enough perl internals :).

Here is what the MP_TRACE()'s before and after he MP_CODE_ATTRS() call
looks like under 5.8.8:

modperl_mgv_resolve: pre MP_CODE_ATTRS attrs: 0
modperl_mgv_resolve: post MP_CODE_ATTRS attrs: 0

Under 5.10.0 its a much different story:
modperl_mgv_resolve: pre MP_CODE_ATTRS attrs: 0
modperl_mgv_resolve: post MP_CODE_ATTRS attrs: 9905fb8

The "sometimes-it-works" "sometimes-it-doesnt" behaviour depends on if
the right bits end up getting set in the attrs from the random data
coming out of MP_CODE_ATTRS().

Oh well, I'm going back to 5.8.8 for now I guess :).

I'll file a bug report as well :).

Regards,
Michael Schout

Re: Perl 5.10

Posted by Michael Schout <ms...@gkg.net>.
Michael Schout wrote:

> [Fri Dec 21 10:57:47 2007] [error] an unknown filter was not added:
> Foo::Filter::StripWhiteSpace

in addition, with PerlTrace enabled, I get:

modperl_filter_add_request: a non-mod_perl OutputFilter handler
Foo::Filter::StripWhiteSpace configured.

Regards,
Michael Schout

Re: Perl 5.10

Posted by Michael Schout <ms...@gkg.net>.
Andreas J. Koenig wrote:
>>>>>> On Thu, 20 Dec 2007 11:38:02 -0500, Colin Wetherbee <cw...@denterprises.org> said:
> 
>   > Have any of you used mod_perl with Perl 5.10 yet?  Are there any
>   > gotchas to consider?
> 
> Modperl1 doesn't work, patch available. As for modperl2 I don't know.

I apparently should not have sent the last email.  I have since found a
problem for me.  I'm having trouble getting my custom
PerlOutputFilterHandler to fire.  It works flawlessly under the same
mod_perl 2.0.3/apache 2.2.6/perl 5.8.8.. but with 5.10, *usually* it
refuses to run it and just says:

[Fri Dec 21 10:57:47 2007] [error] an unknown filter was not added:
Foo::Filter::StripWhiteSpace

I thought it might be Attribute::Handlers related since
::StripWhiteSpace->handler is defined with the :method attr.  But
changing the config to specify the method name as well does not help
either.  I haven't had time to figure out what is going on yet.  It
could be something specific to my setup ;).

Regards,
Michael Schout

Re: Perl 5.10

Posted by Michael Schout <ms...@gkg.net>.
Andreas J. Koenig wrote:

> Modperl1 doesn't work, patch available. As for modperl2 I don't know.

I've been running 5.10 in my modperl2/apache2.2 sandbox development
environment since yesterday.  Haven't run into any issues related to
5.10 yet, but its still early on for me :).

Regards,
Michael Schout

Re: Perl 5.10

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

John Siracusa wrote:
> On 12/21/07 2:32 AM, Andreas J. Koenig wrote:
>> I fear I do not understand enough of mod_perl to volunteer to make a
>> release.
> 
> Me neither, but have you at least contacted the mod_perl maintainers about
> this?  Perhaps you could file a bug on rt.cpan.org even?

the current maintainers hang out here :)

we'll try to roll a mp1 release soonish, which should address 5.10
issues.  with the holidays it might be difficult, but hopefully it won't
take too long after the new year.

--Geoff

Re: Perl 5.10

Posted by John Siracusa <si...@gmail.com>.
On 12/21/07 2:32 AM, Andreas J. Koenig wrote:
> I fear I do not understand enough of mod_perl to volunteer to make a
> release.

Me neither, but have you at least contacted the mod_perl maintainers about
this?  Perhaps you could file a bug on rt.cpan.org even?

-John



Re: Perl 5.10

Posted by "Andreas J. Koenig" <an...@franz.ak.mind.de>.
>>>>> On Thu, 20 Dec 2007 11:38:02 -0500, Colin Wetherbee <cw...@denterprises.org> said:

  > Have any of you used mod_perl with Perl 5.10 yet?  Are there any
  > gotchas to consider?

Modperl1 doesn't work, patch available. As for modperl2 I don't know.
I'm resending my posting which probably got lost in a moderator queue
or what (I just re-subscribed, so this one should probasbly come
through):

  From: andreas.koenig.7os6VVqR@franz.ak.mind.de (Andreas J. Koenig)
  Subject: perl 5.10 will not work with modperl 1.30, please consider new release
  To: modperl@perl.apache.org
  Date: Fri, 14 Dec 2007 08:28:14 +0100

  http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2007-12/msg00278.html

  This is the currently latest posting in the thread that worked out the
  relevant issue.

  Would be really cool if mod_perl1 could be brought up to date so that
  people working with 5.10 do not have to hunt for patches.

  I fear I do not understand enough of mod_perl to volunteer to make a
  release.

  Thanks,
  -- 
  andreas