package LSRfm::Application::Home; use strict; use warnings; use base qw(LSRfm::Base); use Apache::Reload; sub setup { my $self = shift; $self->start_mode('home'); $self->run_modes([qw/home/]); } sub home { my $self = shift; my $html_template = $self->param('html_template'); my $output; $html_template->process('home', { wrapper => $self->wrapper(), }, \$output) || die $html_template->error; return $output; } 1;
Base:
package LSRfm::Base; use strict; use warnings; use base qw(CGI::Application); use Apache::Reload; use CGI::Application::ValidateRM; use LSRfm::Config;#just database vars use LSRfm::Mail::Template; use Template; use Class::Date; use POSIX 'strftime'; our $INCLUDE_PATH = $LSRfm::Config::INCLUDE_PATH; sub handler : method { my ($pkg, $r) = @_; my $self = $pkg->new(); $self->run(); } sub cgiapp_init { my $self = shift; $self->param('html_template', Template->new({ INCLUDE_PATH => $INCLUDE_PATH, WRAPPER => 'wrapper'})); } sub wrapper { return; } 1;
In reply to Sub home:
by barrycarlyon
in thread A question regarding cookies
by barrycarlyon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |