in reply to Re: Editing data extracted from mysql through CGI/mod_perl
in thread Editing data extracted from mysql through CGI/mod_perl
You mentioned using a more generalized conneciton method, which makes sense, however.. how do I pass artguments between subs, yet retain their ability to stay local? In the example above, you mentioned using:
my ($dbh, $article_id) = @_;
..except I'll never know which arguments are passed to $dbh each time. Somtimes it may be one argument, sometimes 20 arguments, so I'll have to construct that inside the sub (not global), after I know the arguments that are going to be passed, right? In this case, that means I have to recreate that handle in each sub where it's used.
Herein lies one part of the equation I'm not familiar with; passing locals between subs as arguments, but never knowing how many arguments will be passed beforehand.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Editing data extracted from mysql through CGI/mod_perl
by Arguile (Hermit) on Jun 10, 2002 at 21:07 UTC |