in reply to First Perl CGI app; desirous of peer review.
Regarding Masem's suggestion for a dispatch table, instead of changing the function signatures for all of your subroutines, you can use anonymous subs:
Ahh, closures.my %functions = ( default => sub { write_default($script_loc) }, warning => sub { write_warning($script_loc, $email, $name, $warnin +g_msg) }, confirm => sub { write_confirm($script_loc, $email, $name) }, commit => sub { write_commit($email, $name) }, );
Update: mischief caught a missing curly brace.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: First Perl CGI app; desirous of peer review.
by legLess (Hermit) on Jun 24, 2001 at 22:16 UTC |