[lug] @INC problems
rm at mamma.varadinet.de
rm at mamma.varadinet.de
Tue Oct 31 11:44:51 MST 2000
On Tue, Oct 31, 2000 at 10:51:01AM -0700, John Starkey wrote:
> Ralph. Thanks a lot.
>
> > John, what version of meomail are you trying to install?
>
> 1.14
>
> > What happens if you replace
> >
> > require "neomail.conf";
> >
> > with
> >
> > open NM, "@@@NEOMAILDIR@@@/neomail.conf" or die "Ups $!\n";
> > do "@@@NEOMAILDIR@@@/neomail.conf";
> >
> > in 'neomail.template' and run the installation again?
> > (here we check whether neomaol.conf is readable by the
> > perl interpreter).
>
> So if it isn't readable I'd get an error while running setup.pl or the
> app?
You should get a runtime error when the app is executing.
If you changed the lines in neomail.pl and the script doesn't die
than the permissions on neomail.conf seem to be ok.
> I reran the setup and everything is fine. I'm getting the same
> response while trying to access it from my browser now as I did when I
> changed
>
> push (@INC, "/var/neomail")
>
> to
>
> push (@INC, ".")
>
> And move .conf to the . dir. It's able to find the .conf file but the
> browser is showing:
"." ??? This is the current working directory. There should be nothing
wrong with push '(@INC, "/var/neomail")' as long as the file can be
found there.
> NEOMAIL ERROR
> Default!
>
> Kinda vague eh?? No error report in apache's error_log or in the
> neomail.log.
Yes, i wouldn't call neomails error handling a perfect solution.
You could use one of the CPAN modules for better error diagnosis.
As a first attempt i would open neomail.pl and locate the error
function (in vi: /sub neomailerror <enter>) and then change
print shift;
to
print shift, "($!)";
if you are lucky the variable $! (last error message) is still
there and contains usefull information.
> Do you know of a trick that will echo the diagnostic data to the
> screen? Maybe I can step through it to find out what line it's chocking
> on?
There is a Perl module that'll send warnings and fatals to the
browser ('perldoc CGI::Carp' will help). Also you can install
CGI::Debug and add 'use CGI::Debug( report => 'everything', on => 'anything' );'
at the top of neomail.pl. And if that's not verbose enough:
use Diagnostics qw( verbose );
at the begining top of the script.
> Hey, thanks again, you really went outta yer way to help. I
> really appreciate it.
Thanks,
Ralf
More information about the LUG
mailing list