note
Anonymous Monk
<p> Thanks for your inputs, I have updated the relevant code . </p>
<p>perl -wc VPage.pm</p>
<code>
VPage.pm syntax OK
</code>
<code>
VPage.pm file and using same Login.pm
package MyLib::VPage;
use strict;
use lib '/var/www/cgi-bin/WebApp/libs';
use base 'MyLib::Login';
sub cgiapp_init {
my $self = shift;
$self->SUPER::cgiapp_init;
$self->authen->protected_runmodes(
'myrunmode',
);
}
sub myrunmode: StartRunmode {
my $self = shift;
my $template = $self->load_tmpl("myrunmode.html");
### guts of old vpage.cgi go in here
print "Testing after login success"; # im doing lot of process with CGI and perl script
$template->param({
OUPUT => $output, # your output goes in here...
});
return $template->output;
}
1;
</code>
<code>
vpage.pl - file
#!/usr/bin/perl
use strict;
use lib '/var/www/cgi-bin/WebApp/libs';
use MyLib::VPage;
my $webapp = MyLib::VPage->new(
PARAMS => {
cfg_file => ['simple.ini', 'vpage.ini'],
format => 'equal',
},
);
$webapp->run();
</code>
622071
1153548
1