# OLD: # if we need to run a command that doesn't require fully parsing the config file, do it now (and exit) if (!defined($cmd) or ((!$cmd) && ('0' ne $cmd))) { show_usage(); } elsif ($cmd eq 'help') { show_help(); } elsif ($cmd eq 'version') { show_version(); } elsif ($cmd eq 'version-only') { show_version_only(); } elsif ($cmd eq 'check-config-version') { check_config_version(); } elsif ($cmd eq 'upgrade-config-file') { upgrade_config_file(); } # NEW: # if we need to run a command that doesn't require fully parsing the config file, do it now (and exit) for ($cmd) { show_usage() if !defined($_) or ((!$_) && ('0' ne $_)); show_help() if /help/; show_version() if /version/; show_version_only() if /version-only/; check_config_version() if /check-config-version/; upgrade_config_file() if /upgrade-config-file/; }