actually,  I think the best way is add one PerlRequire to your apache
configure file.

Mike

在 2010年3月22日 下午3:40,宇捷 <hf...@163.com>写道:

> Try to add
> use lib "/dir/to/your/module";
> before use module.
>
> -----邮件原件-----
> 发件人: mason-users-boun...@lists.sourceforge.net
> [mailto:mason-users-boun...@lists.sourceforge.net] 代表 Sergey
> 发送时间: 2010年3月22日 14:40
> 收件人: Mason-users@lists.sourceforge.net
> 主题: [Mason] unstable use of module (Mason 1.36 and Apache 2.2.14)
>
> Hello.
>
> I'm studying Mason and collided with an incomprehensible problem: a module
> is
> not always used.
>
> Simplified example:
>
> ========
> package BroncConf2;
>
> use strict;
> use vars qw(@ISA @EXPORT @EXPORT_OK);
> require Exporter;
> #use Time::Local;
>
> BEGIN {
>  @ISA = qw(Exporter);
>
>  @EXPORT = qw(
>  );
>
>  @EXPORT_OK = qw(
>    &bronc_HR2 &bronc_HR3
>  );
> }
>
> sub bronc_HR2 {
>  return
> {
>  options => {
>    title       => 'HR',
>  },
> };
>
> } # end bronc_HR2
>
> sub bronc_HR3 {
>  return
> {
>  options => {
>    title       => 'HR',
>  },
> };
>
> } # end bronc_HR3
>
> 1;
> ========
>
> The code:
>
> ========
> <%method images>
> % return (\...@images);
> </%method>
>
> <%once>
> use BroncConf2 qw(&bronc_HR2 &bronc_HR3);
>
> my @images;
>
> push @images, bronc_HR2();
> push @images, bronc_HR3();
>
> </%once>
> ========
>
> Sometime it works, sometime en error:
>
> Error during compilation of /var/www/vhosts/statgraph/htdoc/SW/sw1.html:
> "bronc_HR3" is not exported by the BroncConf2 module
> Can't continue after import errors at
> /var/www/vhosts/statgraph/htdoc/SW/sw1.html line 6
> BEGIN failed--compilation aborted at
> /var/www/vhosts/statgraph/htdoc/SW/sw1.
> html line 6.
>
> I use Mason 1.36 and Apache 2.2.14. Does Someone may suppose  a source
> a problem ?
>
> --
> Regards,
> Sergey
>
>
> ----------------------------------------------------------------------------
> --
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to