On Sun, Mar 06, 2005 at 10:32:26AM -0800, Michael G Schwern wrote:
> #!/usr/bin/perl -w
>
> use Getopt::Long;
>
> my %Opts;
> GetOptions(\%Opts, "test");
>
> sub main {
> return if $Opts{test};
>
> ...the program using the functions below...
> }
> main();
>
> sub some_function { ... }
> sub some_other_function { ... }
I'd make that just:
sub main {
...the program using the functions below...
}
main() unless caller;
sub some_function { ... }
sub some_other_function { ... }
