pmc2 has asked for the wisdom of the Perl Monks concerning the following question:
I also want to use it like a standard perl module../DBUtil.pm clone_db arg1 arg2 arg3
The problem is if there is code to handle a commandline interface in the module it will be executed when the module is pulled in as a standard perl module. In java or c I'd put it in a "main" function. Where do I put it in perl?use DBUtil; clone_db($arg1,$arg2,$arg2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: java/c has main - perl has ?
by tachyon (Chancellor) on Mar 31, 2003 at 23:57 UTC | |
|
Re: java/c has main - perl has ?
by hv (Prior) on Apr 01, 2003 at 00:37 UTC | |
|
Re: java/c has main - perl has ?
by BrowserUk (Patriarch) on Apr 01, 2003 at 01:34 UTC | |
|
Re: java/c has main - perl has ?
by cees (Curate) on Apr 01, 2003 at 00:01 UTC | |
|
Re: java/c has main - perl has ?
by VSarkiss (Monsignor) on Apr 01, 2003 at 03:04 UTC |