Hi Peter,
Thanks for your promp reply, I have tried to reinstall Cache::Mmap
via CPAN as you suggested, but doesn't seems to help, the error still
show up.
I am pitty sure the perl have not been changed after I installed
mod_perl, but I will try recompile mod_perl tomorrow just to make
sure.
I might have a syntex problem before now I relocated the new
statement which the code read something like this now.
my $vhostcache = Cache::Mmap->new("/tmp/vhost.mmap", \%options);
.. (bunch of codes)
($rv, $res) = $vhostcache->read($host);
instead of read.al now it complain _lock.al
Can't locate auto/Cache/Mmap/_lock.al in @INC
anyways, maybe I should try reinstall mod_perl first and see if that
fixes the problem.
Many thanks.
Tor.
On Mon, 19 Jul 2004 11:59:45 +0100, Peter Haworth
<[EMAIL PROTECTED]> wrote:
> On Mon, 19 Jul 2004 11:57:56 +0800, Victor Tsang wrote:
> > Has anyone tried using Cache::Mmap in mod_perl?
>
> That's what I wrote it for. My application uses Cache::Mmap to share
> caches between apache children and other processes.
>
> > I have written a perl code to test my design off apache, it works
> > very well, performance is great too,
>
> Glad to hear it.
>
> > but as soon as I move the code into mod_perl, the script fail and
> > report in error log
> >
> > Can't locate auto/Cache/Mmap/read.al in @INC
>
> I'm having trouble seeing how this could occur with the module
> correctly installed, since Cache::Mmap doesn't use AutoLoader
> (although DynaLoader does pull it in). In any case, if new() is
> defined (which is must be, since you're trying to call read()), then
> read() ought to be, too.
>
> I suspect one of the following:
> * your normal perl is different to your mod_perl perl, and the
> Cache::Mmap installation in the mod_perl perl is broken
> * you are calling Cache::Mmap::read() directly, and haven't loaded the
> module. I can't imagine why you'd do this, though, and your non-
> mod_perl version of this code wouldn't work, either.
>
> Check that the mod_perl copy of Cache::Mmap is installed correctly.
> Use CPAN's "force install" option if necessary, and make sure that you
> are using the perl appropriate to your mod_perl installation.
>
> --
> Peter Haworth [EMAIL PROTECTED]
> "Do you count brain rot as a valid reason?"
> -- Larry Wall
>
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html