in reply to How to get those CGIs running in a frame.
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to get those CGIs running in a frame.
by neniro (Priest) on Apr 08, 2004 at 16:44 UTC | |
by Tomte (Priest) on Apr 08, 2004 at 17:09 UTC |