Hello, I am having a problem with the value for tmpl_path disappearing. Perhaps someone can explain the error of my ways.
Here are the codes and the the error logs for a logon sequence. I set tmpl_path in cgiapp_init along with acquiring the cgi parameters and setting a benchmark timer. The start_mode is 'new_logon' which sends a logon page to the user. sub NewLogon { my $self = shift; my $dir = $self->tmpl_path(); warn "DIR: $dir\n"; my $tmpl = $self->load_tmpl( 'new_logon.tmpl', die_on_bad_params => 0, shared_cache => 1 ); # THIS IS LINE 193. -------------------------------------- Error Log: [Tue Jun 11 13:06:07 2002] public.cgi: DIR: /home/user/tmpl/ [Tue Jun 11 13:06:07 2002] public.cgi: BENCHMARK => new_logon: 1 wallclock secs ( 0.03 usr + 0.02 sys = 0.05 CPU) tmpl_path works just fine. ======================================== Then the user enters his ID and pwd and the rm of the returning html is 'update_logon': sub UpdateLogon { my $self = shift; my $record = $self->param( 'record_obj' ); # Runs SQL queries my $args = $self->param( 'args' ); # Parameters from HTML If the SQL 'select' for ID and PWD returns no value then, an error message ($error) is returned. my ($error, $user_id, $pginfo ) = $record->update_logon( $args->{username}, $args->{pwd} ); if( $error ) { $self->param( 'errmsg' => $error ); NewLogon(); } -------------------------------------- Error Log: [Tue Jun 11 13:06:12 2002] public.cgi: Error executing run mode 'update_logon'. Eval of code '$self->UpdateLogon' resulted in error: Can't call method "tmpl_path" on an undefined value at /home/user/lib/public/Main.pm line 193. Why does $self->tmpl_path disappear? Thanks, Eric. --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@lists.vm.com/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]