in reply to Re^3: Selective Optimization
in thread Selective Optimization
sub help { # print basic help menu and exit. print "vpimport\n"; print "version $VERSION\n"; print "Format vendor price files for import to InOrder.\n\n"; print "Usage: vpimport [--vendor <VENDOR>] [--pricefile <file>] " . "[--outfile <file>] [--pricesource <name>] [--live] " . "[--no-create] [--help].\n"; print "--vendor <VENDOR> The vendor code of the vendor to update +.\n"; print "--pricefile <file> The name of the vendor's price file.\n" +; print "--pricesource <name> The price source to add/update.\n"; print "--live Use InOrder_Live instead of " . "InOrder_Development\n"; print "--no-create Don't create new inventory/vendor items +.\n"; print "--help Print this help and exit.\n"; print "--version Print version and exit.\n"; exit(0); }
These are called via command line options (I'm using Getopt::Long) in the following code:sub version { #print version number and exit print "$VERSION\n"; exit(0); }
my $result = GetOptions ( "version" => \&version, # print version and exit. "help" => \&help, # print basic help and exit. "vendor=s" => \$vendor, # The vendor code to update for. "pricefile=s" => \$pFile, # The vendor price file we're reading. "pricesource=s" => \$pSource, # name of the new price list, "live" => \$useLive, # Are we using the live database? "no-create" => \$no_create, # Don't create new items. );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Selective Optimization
by jrsimmon (Hermit) on Dec 18, 2007 at 22:44 UTC | |
by starX (Chaplain) on Dec 19, 2007 at 16:45 UTC |