Perl block handler problems
--00148531a39f01fe7e04754423b3
Content-Type: text/plain; charset=ISO-8859-1
Hi all,
I was trying to set up some perl code to configure my apache server
dynamically and came across this:
http://perl.apache.org/docs/2.0/api/Apache2/PerlSections.htm l#Advanced_API.
Upon trying it out however, I could not get it working correctly. It
seems that the Perl code in the <Perl> block is getting executed fine, but
there are problems when trying to parse the "handler=xxx" portion of the
opening tag.
For example, if I have <Perl handler="Foo"> it will complain that "Foo" can
not be found in [at] INC. However, if I leave the quotes off of the module,
<Perl handler=Foo>, it seems to work fine. Also, the example in the docs
shows the handler method being defined as "sub My::Handler::handler :
handler " which for me gives an error. Though using the ": method"
attribute works.
So, is the handler feature of Perl blocks just not yet working right? Has
anyone else had luck with it? Are the docs incorrect?
mod_perl 2.0.4
apache 2.2.13
perl 5.10.1
Thanks,
Kevin
--00148531a39f01fe7e04754423b3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi all,<br>=A0 I was trying to set up some perl code to configure my apache=
server dynamically and came across this: <a href=3D"http://perl.apache.org=
/docs/2.0/api/Apache2/PerlSections.html#Advanced_API">http:/ /perl.apache.or=
g/docs/2.0/api/Apache2/PerlSections.html#Advanced_API</a> .=A0 Upon trying =
it out however, I could not get it working correctly.=A0 It seems that the =
Perl code in the <Perl> block is getting executed fine, but there are=
problems when trying to parse the "handler=3Dxxx" portion of the=
opening tag.<br>
<br>For example, if I have <Perl handler=3D"Foo">=A0 it wil=
l complain that "Foo" can not be found in [at] INC.=A0 However, if I =
leave the quotes off of the module, <Perl handler=3DFoo>, it seems to=
work fine.=A0 Also, the example in the docs shows the handler method being=
defined as "sub My::Handler::handler : handler " which for me gi=
ves an error.=A0 Though using the ": method" attribute works.<br>
<br>So, is the handler feature of Perl blocks just not yet working right?=
=A0 Has anyone else had luck with it?=A0 Are the docs incorrect?<br><br><br=
>mod_perl 2.0.4<br>apache 2.2.13<br>perl 5.10.1<br><br>Thanks,<br>Kevin<br>
--00148531a39f01fe7e04754423b3--
Re: Perl block handler problems
--001485f7258ee9e8e50475d20a1d
Content-Type: text/plain; charset=ISO-8859-1
I don't mean to be a pest but I'd like to further explore using handlers for
Perl sections. Does anyone have any info on this or can point me in another
direction?
I guess I can just put my dynamic configs in a perl module that's not called
as a handler and just 'use' it in the apache config, right? I know I can
put it in a Perl section using the default handler but I'd like to have my
perl code in a separate module and not the apache config.
On Tue, Oct 6, 2009 at 9:23 AM, Kevin Bosak <philote [at] gmail.com> wrote:
> Hi all,
> I was trying to set up some perl code to configure my apache server
> dynamically and came across this:
> http://perl.apache.org/docs/2.0/api/Apache2/PerlSections.htm l#Advanced_API. Upon trying it out however, I could not get it working correctly. It
> seems that the Perl code in the <Perl> block is getting executed fine, but
> there are problems when trying to parse the "handler=xxx" portion of the
> opening tag.
>
> For example, if I have <Perl handler="Foo"> it will complain that "Foo"
> can not be found in [at] INC. However, if I leave the quotes off of the module,
> <Perl handler=Foo>, it seems to work fine. Also, the example in the docs
> shows the handler method being defined as "sub My::Handler::handler :
> handler " which for me gives an error. Though using the ": method"
> attribute works.
>
> So, is the handler feature of Perl blocks just not yet working right? Has
> anyone else had luck with it? Are the docs incorrect?
>
>
> mod_perl 2.0.4
> apache 2.2.13
> perl 5.10.1
>
> Thanks,
> Kevin
>
--001485f7258ee9e8e50475d20a1d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I don't mean to be a pest but I'd like to further explore using han=
dlers for Perl sections.=A0 Does anyone have any info on this or can point =
me in another direction?<br><br>I guess I can just put my dynamic configs i=
n a perl module that's not called as a handler and just 'use' i=
t in the apache config, right?=A0 I know I can put it in a Perl section usi=
ng the default handler but I'd like to have my perl code in a separate =
module and not the apache config.<br>
<br><div class=3D"gmail_quote">On Tue, Oct 6, 2009 at 9:23 AM, Kevin Bosak =
<span dir=3D"ltr"><<a href=3D"mailto:philote [at] gmail.com">philote [at] gmail.co=
m</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"borde=
r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le=
ft: 1ex;">
Hi all,<br>=A0 I was trying to set up some perl code to configure my apache=
server dynamically and came across this: <a href=3D"http://perl.apache.org=
/docs/2.0/api/Apache2/PerlSections.html#Advanced_API" target=3D"_blank">htt=
p://perl.apache.org/docs/2.0/api/Apache2/PerlSections.html#A dvanced_API</a>=
.=A0 Upon trying it out however, I could not get it working correctly.=A0 =
It seems that the Perl code in the <Perl> block is getting executed f=
ine, but there are problems when trying to parse the "handler=3Dxxx&qu=
ot; portion of the opening tag.<br>
<br>For example, if I have <Perl handler=3D"Foo">=A0 it wil=
l complain that "Foo" can not be found in [at] INC.=A0 However, if I =
leave the quotes off of the module, <Perl handler=3DFoo>, it seems to=
work fine.=A0 Also, the example in the docs shows the handler method being=
defined as "sub My::Handler::handler : handler " which for me gi=
ves an error.=A0 Though using the ": method" attribute works.<br>
<br>So, is the handler feature of Perl blocks just not yet working right?=
=A0 Has anyone else had luck with it?=A0 Are the docs incorrect?<br><br><br=
>mod_perl 2.0.4<br>apache 2.2.13<br>perl 5.10.1<br><br>Thanks,<br><font col=
or=3D"#888888">Kevin<br>
</font></blockquote></div><br>
--001485f7258ee9e8e50475d20a1d--