Re: Undefined subroutine apache_request_to_comp_path using MasonX::Request::ExtendedCompRoot

Guido Brugnara <[email protected]> Mon, 17 Apr 2017 11:19:56 +0200 (CEST)
Newsgroups gmane.comp.web.mason.user
Message-ID <[email protected]>
--===============6048856396983169630==
Content-Type: multipart/alternative; 
	boundary="----=_Part_596_1655335418.1492420796198"

------=_Part_596_1655335418.1492420796198
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

----- Il 17-apr-17, alle 2:24, Alex Robinson <[email protected]> ha scritto: 

> Hi gdo

> Are you using HTML:Mason rather than Mason 2? (and if so, why? ;)

> http://search.cpan.org/~drolsky/HTML-Mason-1.56/lib/HTML/Mason.pm#WAIT_-_HAVE_YOU_SEEN_MASON_2
> ?

The answer is very simple : we have a legacy of 150 thousand lines of code written with HTML::Mason and their conversion would be very costly because the new Mason is not backward compatible and converters are not available. 

> I've attached 2 files that essentially show what I kludged up back in 2004 or 5.
> Or whenever
> The ApacheHandler is massively cut down, but hopefully it gives the rough idea.

> My apache config contains something along the lines of:

> PerlModule Apache2::compat

We don't use this module in our environment. 
Do you think it is mandatory to use MasonX::Request::ExtendedCompRoot module? 

> PerlSetVar MasonArgsMethod mod_perl
> PerlOptions +GlobalRequest
> PerlModule EDT::Mason::ApacheHandler

> <Location />
> Require all granted
> SetHandler modperl
> PerlHandler EDT::Mason::ApacheHandler
> </Location>

> Works for me - YMMV (there are still several sites still running on it having
> been migrated from box to box - I can confirm against Apache 2.4.6 ;)

> Sorry to not have a clean and concise answer...

> Alex

> On 16 April 2017 at 20:16, Guido Brugnara < [email protected] > wrote:

>> To set up the MasonX::Request::ExtendedCompRoot component I have add these two
>> rows in my Apache 2.4 config file:

>> PerlSetVar MasonRequestClass MasonX::Request::ExtendedCompRoot
>> PerlSetVar MasonResolverClass MasonX::Resolver::ExtendedCompRoot

>> ... but the Apache 2.4 (or 2.2) server respond with this error:

>> [Sun Apr 16 20:26:17.446351 2017] [perl:error] [pid 5672] [client
>> 192.168.9.2:40230 ] Undefined subroutine
>> &HTML::Mason::Resolver::File::ApacheHandler::apache_request_to_comp_path called
>> at /

>> Someone use with success this component with Apache 2?

>> My goal is to call to a specific component root, for example to partially change
>> the component beavior in main root with a component in the secondary root which
>> then calls the main component.

>> There are MasonX::Request::ExtendedCompRoot alternatives?

>> Any suggestions would be appreciated.

>> bye
>> gdo

>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Mason-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mason-users

> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Mason-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mason-users

------=_Part_596_1655335418.1492420796198
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"font-family: arial, helvetica, sans-serif; font-s=
ize: 10pt; color: #000000"><div><span id=3D"zwchr" data-marker=3D"__DIVIDER=
__">----- Il 17-apr-17, alle 2:24, Alex Robinson &lt;[email protected]=
g.com&gt; ha scritto:<br></span></div><div data-marker=3D"__QUOTED_TEXT__">=
<blockquote style=3D"border-left:2px solid #1010FF;margin-left:5px;padding-=
left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:no=
ne;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir=3D"ltr"=
>Hi gdo<br><br><div>Are you using HTML:Mason rather than Mason 2? (and if s=
o, why? ;)</div><br><div><a href=3D"http://search.cpan.org/~drolsky/HTML-Ma=
son-1.56/lib/HTML/Mason.pm#WAIT_-_HAVE_YOU_SEEN_MASON_2" target=3D"_blank">=
http://search.cpan.org/~drolsky/HTML-Mason-1.56/lib/HTML/Mason.pm#WAIT_-_HA=
VE_YOU_SEEN_MASON_2</a>?<br></div></div></blockquote><div><span id=3D"resul=
t_box" class=3D"short_text" lang=3D"en"><span>The answer is</span> <span cl=
ass=3D"">very simple</span></span>: <span id=3D"result_box" class=3D"" lang=
=3D"en"><span class=3D"">we have</span> <span class=3D"alt-edited">a legacy=
 of</span> <span class=3D"alt-edited">150 thousand</span> <span class=3D"">=
lines of code</span></span> written with HTML::Mason <span id=3D"result_box=
" class=3D"" lang=3D"en"><span class=3D"">and their conversion</span> <span=
 class=3D"">would be very</span> <span class=3D"">costly because the new <s=
pan>Mason</span> <span>is not</span> backward compatible&nbsp;<span>and</sp=
an> <span>converters</span> are not available.</span></span> <br></div><div=
><br data-mce-bogus=3D"1"></div><blockquote style=3D"border-left:2px solid =
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font=
-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;f=
ont-size:12pt;"><div dir=3D"ltr">I've attached 2 files that essentially sho=
w what I kludged up back in 2004 or 5. Or whenever<br><div>The ApacheHandle=
r is massively cut down, but hopefully it gives the rough idea.</div><br><d=
iv>My apache config contains something along the lines of:</div><br><div><d=
iv>PerlModule Apache2::compat<br></div></div></div></blockquote><div><br>We=
 don't use this module in our environment. <br></div><div><span id=3D"resul=
t_box" class=3D"short_text" lang=3D"en"><span class=3D"alt-edited">Do you t=
hink</span> <span class=3D"">it is</span> <span>mandatory</span> <span clas=
s=3D"">to use MasonX::Request::ExtendedCompRoot module?<br></span></span> <=
br></div><blockquote style=3D"border-left:2px solid #1010FF;margin-left:5px=
;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-deco=
ration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div di=
r=3D"ltr"><div><div>PerlSetVar MasonArgsMethod mod_perl</div><div>PerlOptio=
ns +GlobalRequest</div><div>PerlModule EDT::Mason::ApacheHandler</div><br><=
div>&lt;Location /&gt;</div><div>Require all granted</div><div>SetHandler m=
odperl</div><div>PerlHandler EDT::Mason::ApacheHandler</div><div>&lt;/Locat=
ion&gt;</div></div><br><br><div>Works for me - YMMV &nbsp;(there are still =
several sites still running on it having been migrated from box to box - I =
can confirm against Apache 2.4.6 ;)</div><br><br><div>Sorry to not have a c=
lean and concise answer...</div><br><br><div>Alex</div><br><br></div><div c=
lass=3D"gmail_extra"><br><div class=3D"gmail_quote">On 16 April 2017 at 20:=
16, Guido Brugnara <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" t=
arget=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">To set up the MasonX::Request::ExtendedCompRoot component I h=
ave add these two rows in my Apache 2.4 config file:<br><br>
&nbsp; &nbsp;PerlSetVar&nbsp; MasonRequestClass&nbsp; &nbsp;MasonX::Request=
::ExtendedCompRoot<br>
&nbsp; &nbsp;PerlSetVar&nbsp; MasonResolverClass&nbsp; MasonX::Resolver::Ex=
tendedCompRoot<br><br>
... but the Apache 2.4 (or 2.2) server respond with this error:<br><br>
&nbsp; &nbsp;[Sun Apr 16 20:26:17.446351 2017] [perl:error] [pid 5672] [cli=
ent <a href=3D"http://192.168.9.2:40230" rel=3D"noreferrer" target=3D"_blan=
k">192.168.9.2:40230</a>] Undefined subroutine &amp;HTML::Mason::Resolver::=
File::ApacheHandler::apache_request_to_comp_path called at /<br><br>
Someone use with success this component with Apache 2?<br><br>
My goal is to call to a specific component root, for example to partially c=
hange the component beavior in main root with a component in the secondary =
root which then calls the main component.<br><br>
There are MasonX::Request::ExtendedCompRoot alternatives?<br><br>
Any suggestions would be appreciated.<br><br>
bye<br>
gdo<br><br>
---------------------------------------------------------------------------=
---<br>
Check out the vibrant tech community on one of the world's most<br>
engaging tech sites, Slashdot.org! <a href=3D"http://sdm.link/slashdot" rel=
=3D"noreferrer" target=3D"_blank">http://sdm.link/slashdot</a><br>
_______________________________________________<br>
Mason-users mailing list<br><a href=3D"mailto:[email protected]=
.net" target=3D"_blank">[email protected]</a><br><a href=3D=
"https://lists.sourceforge.net/lists/listinfo/mason-users" rel=3D"noreferre=
r" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/mason-use=
rs</a><br></blockquote></div><br></div><br>--------------------------------=
----------------------------------------------<br>Check out the vibrant tec=
h community on one of the world's most<br>engaging tech sites, Slashdot.org=
! http://sdm.link/slashdot<br>_____________________________________________=
__<br>Mason-users mailing list<br>[email protected]<br>http=
s://lists.sourceforge.net/lists/listinfo/mason-users<br></blockquote></div>=
</div></body></html>
------=_Part_596_1655335418.1492420796198--


--===============6048856396983169630==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============6048856396983169630==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

--===============6048856396983169630==--