Re: local perl module and "Undefined subroutine &HTML::Mason::Commands" error

Emil-Nicolaie Perhinschi <[email protected]> Tue, 10 Jun 2014 18:08:56 +0300
Newsgroups gmane.comp.web.mason.user
Message-ID <CAC0qhnxp=vYrZYwdvcJ9vYJ4owWg8YU3kUhwahMWTxFf69pRjw@mail.gmail.com>
--===============9140352124260590864==
Content-Type: multipart/alternative; boundary=001a11c2b810ebe4f504fb7cb474

--001a11c2b810ebe4f504fb7cb474
Content-Type: text/plain; charset=UTF-8

> use  bronc::conf::collectd qw(&bronc_swport_extended);

not sure you need the "&" there; if I understand exporting well, it will
try to import a sub "&bronc_swport_extended", not "bronc_swport_extended",
that is why it si trying to find bronc_swport_extended in a HTML::Mason
module




On Tue, Jun 10, 2014 at 12:26 PM, Sergey <[email protected]> wrote:

> Hello.
>
> I attempt to place individual perl module in site's directory
> but it isn't works:
>
> error: Error during compilation of /var/www/vhosts/stat/htdoc/SW/sw1.html:
>        Undefined subroutine &HTML::Mason::Commands::bronc_swport_extended
>        called at /var/www/vhosts/stat/htdoc/SW/sw1.html line 97.
>
> Did path must be described somewhere in addition to @INC ?
>
> I use "PerlSwitches -I/var/www/vhosts/stat/lib" in site's config (Apache2).
> sw1.html (with Mason's code) contains
>
> use  bronc::conf::collectd qw(&bronc_swport_extended);
>
> All works if I move collectd.pm to /usr/share/perl5/BRONC/Conf/Collectd.pm
> and it isn't works if I move it to /usr/share/perl5/BRONC/conf/collectd.pm
> (with correct modification "use ..." in sw1.html of course).
>
> Or is there something is case sensitive ? I use Mason 1.50.
>
> --
> Regards,
> Sergey
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Mason-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mason-users
>



-- 
==================================
Emil Perhinschi     http://www.lunch-break.ro
==================================

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

<div dir=3D"ltr"><div>&gt; use =C2=A0bronc::conf::collectd qw(&amp;bronc_sw=
port_extended);<br><br></div>not
 sure you need the &quot;&amp;&quot; there; if I understand exporting well,=
 it=20
will try to import a sub &quot;&amp;bronc_swport_extended&quot;, not=20
&quot;bronc_swport_extended&quot;, that is why it si trying to find=20
bronc_swport_extended in a HTML::Mason module <br><br><br></div><div class=
=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Tue, Jun 10, 2014 at=
 12:26 PM, Sergey <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" ta=
rget=3D"_blank">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hello.<br>
<br>
I attempt to place individual perl module in site&#39;s directory<br>
but it isn&#39;t works:<br>
<br>
error: Error during compilation of /var/www/vhosts/stat/htdoc/SW/sw1.html:<=
br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0Undefined subroutine &amp;HTML::Mason::Commands:=
:bronc_swport_extended<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0called at /var/www/vhosts/stat/htdoc/SW/sw1.html=
 line 97.<br>
<br>
Did path must be described somewhere in addition to @INC ?<br>
<br>
I use &quot;PerlSwitches -I/var/www/vhosts/stat/lib&quot; in site&#39;s con=
fig (Apache2).<br>
sw1.html (with Mason&#39;s code) contains<br>
<br>
use =C2=A0bronc::conf::collectd qw(&amp;bronc_swport_extended);<br>
<br>
All works if I move <a href=3D"http://collectd.pm" target=3D"_blank">collec=
td.pm</a> to /usr/share/perl5/BRONC/Conf/Collectd.pm<br>
and it isn&#39;t works if I move it to /usr/share/perl5/BRONC/conf/<a href=
=3D"http://collectd.pm" target=3D"_blank">collectd.pm</a><br>
(with correct modification &quot;use ...&quot; in sw1.html of course).<br>
<br>
Or is there something is case sensitive ? I use Mason 1.50.<br>
<br>
--<br>
Regards,<br>
Sergey<br>
<br>
---------------------------------------------------------------------------=
---<br>
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions<b=
r>
Find What Matters Most in Your Big Data with HPCC Systems<br>
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.<br>
Leverages Graph Analysis for Fast Processing &amp; Easy Data Exploration<br=
>
<a href=3D"http://p.sf.net/sfu/hpccsystems" target=3D"_blank">http://p.sf.n=
et/sfu/hpccsystems</a><br>
_______________________________________________<br>
Mason-users mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]=
ceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/mason-users" target=
=3D"_blank">https://lists.sourceforge.net/lists/listinfo/mason-users</a><br=
>
</blockquote></div><br><br clear=3D"all"><br>-- <br>=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D<br>Emil Perhinschi=C2=A0 =C2=A0=C2=A0 <a href=3D"http://www.lunch-br=
eak.ro">http://www.lunch-break.ro</a><br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
</div>

--001a11c2b810ebe4f504fb7cb474--


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

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
--===============9140352124260590864==
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

--===============9140352124260590864==--