you should consider a dispatch-table/-hash to do the dirty work done via if-statements: (the seclev stuff is only there to show some further benefits beneath readabilty-enhancement :)
my $apps = { help => { app => '/main.html', seclev => 0, }, staff => { app => '/cgi-bin/staff' seclevel => 0, }, adm_staff => { app => '/db/staff/selstad.pl', seclevel => 10, }, birthday => { app => '/db/staff/birthday.pl', seclevel => 10, }, jubilee => { app => '/db/staff/firmenjub.pl', seclevel => 10, }, location => { app => '/db/staff/location.pl', seclevel => 10, }, }; my $app = $q->param('app'); $app = 'help' unless exists($apps->{$app}); my $application_to_call = $apps->{$app}{app};
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
In reply to Re: How to get those CGIs running in a frame.
by Tomte
in thread How to get those CGIs running in a frame.
by neniro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |