> "Denzil" == Denzil Kruse <[EMAIL PROTECTED]> writes:
Denzil> But, I fooled around with my above code found out that
Denzil> if I put some curly brackets in the right place, I
Denzil> think it works:
Denzil> $page = $in->param('page');
Denzil> &{page$page}()
You really really *really* don'
--- Denzil Kruse <[EMAIL PROTECTED]> wrote:
> Once the script figures out which page it should go
> to, I dont want to have to do this:
>
> if ($page == 1) { &page1() }
> if ($page == 2) { &page2() }
> if ($page == 3) { &page3() }
As mentioned previously, CGI::Application is a good choice for thi
--- Wiggins d'Anconia <[EMAIL PROTECTED]> wrote:
>
>
> Denzil Kruse wrote:
> > Hi,
> >
> > I have a script for a cgi form that covers about
> 20
> > pages, and want to name a subroutine to handle
> each
> > page like this: page1, page2, page3, etc.
> >
> > Once the script figures out which pag
Denzil Kruse wrote:
Hi,
I have a script for a cgi form that covers about 20
pages, and want to name a subroutine to handle each
page like this: page1, page2, page3, etc.
Once the script figures out which page it should go
to, I dont want to have to do this:
if ($page == 1) { &page1() }
if ($page =
Hi,
I have a script for a cgi form that covers about 20
pages, and want to name a subroutine to handle each
page like this: page1, page2, page3, etc.
Once the script figures out which page it should go
to, I dont want to have to do this:
if ($page == 1) { &page1() }
if ($page == 2) { &page2() }
Theresa,
one way to go about this is to create your own module which has the
connection details in it (or reads from ENV/external XML file etc) and also
has your data access subroutines. Then instantiate instances of this modules
whereever you need to.
This is the best URL I can find which talks
Theresa,
Paul Duboise in his book Perl and MySQL puts all connection schemes in a
library. Would that work for you?
-Original Message-
From: Theresa Mullin [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 2:31 PM
To: [EMAIL PROTECTED]
Subject: Subroutines
Hi Everyone,
I am
Hi Everyone,
I am writing a program in which I am connecting to an oracle database.
I would like to put the environment variables and the connection routine
into a separate subroutine, so I dont have to keep re-copying the code.
Whats the best way to go about this?
Thanks,
Theresa
Theresa