Re: Mason Migration process

Hiram Gibbard <[email protected]> Thu, 31 Mar 2016 16:48:19 -0500
Newsgroups gmane.comp.web.mason.user
Message-ID <CAGTmFdGoaFWqY=FE49+MkWrQ3oV28irbVRnN_HMydUuGOj1Zow@mail.gmail.com>
--===============2757621615154478428==
Content-Type: multipart/alternative; boundary=047d7bfced1476f2a4052f5f38ac

--047d7bfced1476f2a4052f5f38ac
Content-Type: text/plain; charset=UTF-8

HI Again,

I'm making an effort to move a Perl application PREVIOUSLY leveraging Mason
on Apache 1.3 (w/ statically linked modules), and Perl version 5.8.5 to
Apache 2 (DSO) / Perl 5.10.1 ( i realize that is not the current version,
but it is what we have bench-marked from Redhat as a "supportable version"
on RHEL 6.7). I've gotten the application over and started, but there is a
a error that I'm having issue with. Wondering if anyone can help me. This
code appears to generate the following:

Can't call method "bake" on an undefined value at
/opt/cloudhost/apache/www/dworks/lib/DWorks/User.pm line 234, <> line
1.



   # Currently, we're storing our user state in cookies.

        Apache2::Cookie->new(
            $m->apache_req,
            name    => $name,
            value   => $value,
            expires => ($expires || ''), # Default: when browser is closed.
            path    => '/',
            secure  => ($data->{cookie}->{secure} ? 1 : 0),
        )->bake;

User.pm line 234 is the bake->

I don't understand what needs to be updated. based on the cpan docs
for Apache2::Cookie, this appears to be valid.

I've tried

)->bake();

and

)->bake($m);


but that yields the same result (error message)


Should I be using CGI::Cookie for Apache2::Cookie:Jar instead?

I'm not sure how this part works $m->apache_req though.


Hope to hear from someone. Thanks!


On Thu, Mar 24, 2016 at 12:25 PM, Hiram Gibbard <[email protected]> wrote:

> I've been tasked to migrate a application which uses Perl/Mmason to serve
> an application and I'm migrating the app to more current OS and Apache
> software. In the sense of the migration, and easiest path, should I stick
> with Mason, or would it be better for me to leverage Mason2 for this effort?
>
>
> --
> [email protected]
>
>
>


-- 
Hiram Gibbard
[email protected]
http://hiramgibbard.com

--047d7bfced1476f2a4052f5f38ac
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">HI Again,<div><br></div><div>I&#39;m making an effort to m=
ove a Perl application PREVIOUSLY leveraging Mason on Apache 1.3 (w/ static=
ally linked modules), and Perl version 5.8.5 to Apache 2 (DSO) / Perl 5.10.=
1 ( i realize that is not the current version, but it is what we have bench=
-marked from Redhat as a &quot;supportable version&quot; on RHEL 6.7). I&#3=
9;ve gotten the application over and started, but there is a a error that I=
&#39;m having issue with. Wondering if anyone can help me. This code appear=
s to generate the following:</div><div><br></div><div><pre>Can&#39;t call m=
ethod &quot;bake&quot; on an undefined value at /opt/cloudhost/apache/www/d=
works/lib/DWorks/User.pm line 234, &lt;&gt; line 1.
</pre></div><div><pre>    =C2=A0</pre><pre><span style=3D"font-family:arial=
,sans-serif">   # Currently, we&#39;re storing our user state in cookies.</=
span><br></pre><pre>        Apache2::Cookie-&gt;new(
            $m-&gt;apache_req,
            name    =3D&gt; $name,
            value   =3D&gt; $value,
            expires =3D&gt; ($expires || &#39;&#39;), # Default: when brows=
er is closed.
            path    =3D&gt; &#39;/&#39;,
            secure  =3D&gt; ($data-&gt;{cookie}-&gt;{secure} ? 1 : 0),
        )-&gt;bake;
</pre></div><div><pre>User.pm line 234 is the bake-&gt;</pre><pre>I don&#39=
;t understand what needs to be updated. based on the cpan docs for Apache2:=
:Cookie, this appears to be valid.</pre><pre><span style=3D"font-family:ari=
al,sans-serif">I&#39;ve tried=C2=A0</span><br></pre><pre>)-&gt;bake();</pre=
><pre>and</pre><pre>)-&gt;bake($m);</pre><pre><br></pre><pre>but that yield=
s the same result (error message)</pre><pre><br></pre><pre>Should I be usin=
g CGI::Cookie for Apache2::Cookie:Jar instead? </pre><pre>I&#39;m not sure =
how this part works <span style=3D"font-family:arial,sans-serif">$m-&gt;apa=
che_req though.</span></pre><pre><span style=3D"font-family:arial,sans-seri=
f"><br></span></pre><pre><font face=3D"arial, sans-serif">Hope to hear from=
 someone. Thanks!</font></pre></div></div><div class=3D"gmail_extra"><br><d=
iv class=3D"gmail_quote">On Thu, Mar 24, 2016 at 12:25 PM, Hiram Gibbard <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><blockquote type=3D"cite" style=3D"font-size:12.8px"><div=
 dir=3D"ltr">I&#39;ve been tasked to migrate a application which uses Perl/=
M<span>mason</span>=C2=A0to serve an application and I&#39;m migrating the =
app to more current OS and Apache software. In the sense of the migration, =
and easiest path, should I stick with Mason, or would it be better for me t=
o leverage Mason2 for this effort?</div></blockquote><span class=3D"HOEnZb"=
><font color=3D"#888888"><div><br></div>-- <br><div><div dir=3D"ltr"><div><=
a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</=
a></div><div><br></div><div><br><div style=3D"display:inline"></div></div><=
/div></div>
</font></span></div>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class=
=3D"gmail_signature"><div dir=3D"ltr"><div>Hiram Gibbard<br><a href=3D"mail=
to:[email protected]" target=3D"_blank">[email protected]</a></div><div><=
a href=3D"http://hiramgibbard.com" target=3D"_blank">http://hiramgibbard.co=
m</a></div><div><br><div style=3D"display:inline"></div></div></div></div>
</div>

--047d7bfced1476f2a4052f5f38ac--


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

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
--===============2757621615154478428==
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

--===============2757621615154478428==--