[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] CAP::Authentication Error


perlmonkey:

Thank you for your reply.  The rest of the user.cgi script is below.  I used your suggestion and it worked.  Now on to other issues I have to learn to work out.

user.cgi

#!/usr/bin/perl -wT

use strict;
use lib '.';
use CGI::Carp qw(fatalsToBrowser);
use MyApp::User;

my $webapp = MyApp::User->new( PARAMS => { cfg_file => 'myapp.cfg' } );
$webapp->run();

Thank you for your help.

Kevin
  ----- Original Message ----- 
  From: perlmonkey 
  To: Kevin 
  Sent: Thursday, March 09, 2006 8:38 PM
  Subject: Re: [cgiapp] CAP::Authentication Error


  Kevin-

  Since you didn't include the whole cgi script I'm guessing it does this:

  my $app = CAP->new();
  $app->cfg_file('myapp.cfg');
  $app->run();


  If so, then the problem is that CAP will call both cgiapp_init and setup from within it's constructor - which means that cgiapp_init is calling cfg before the cfg_file is set. 

  Try this:
  my $app = CAP->new( PARAMS => { cfg_file => 'mpapp.cfg' } );
  $app->run();

Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.