- or download this
my %dispatch = (
home => \&home,
...
faq => \&faq,
....
);
- or download this
my %dispatch = (
home => sub { \&home(); },
...
faq => sub { \&faq(); },
....
);
- or download this
my $default_action = 'home';
my $action = $cgi->param('a') || '';
...
my $executor = $dispatch{$action} ||
$dispatch{$default_action};
&$executor();
- or download this
... some html....
<tmpl_include name="other-template.html">
<tmpl_include name="other-static.html">
- or download this
<!-- news.html -->
...some placeholders here...
...
...
</html>
<!-- end of main.html -->
- or download this
# assuming load_template() is defined somewhere
# to return a template object
...
);
print $template->output;