- or download this
use ConfigIni; #my own wrapper
use Getopt::Long;
...
#now %config holds all your parameters and they're properly initialize
+d -- the command line overrides anything in the ini file
- or download this
sub get_options
{
...
croak "Password must be specified in [General] ini file" if !defin
+ed $config->{password};
croak "Data_dir must be specified in [General] section of ini file
+" if !defined $config->{data_dir};
} #sub init_config
- or download this
package ConfigIni;
...
}
1;