Created
June 19, 2023 14:03
-
-
Save earnhardt3rd/617c8c151e41aba28715ee58264772d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'getopts.pl'; | |
| Getopts('m:d:t'); | |
| my $MODE = uc($opt_m) || ""; | |
| my $DEBUG = $opt_d || 0; | |
| if (defined $opt_t) { my %TEST = &_SETUP_CONFIG_PATH();} | |
| 1; | |
| sub _SETUP_CONFIG_PATH { | |
| my $PATH_TAG = shift || ""; | |
| if ($PATH_TAG eq "") {return "Invalid Config Tag!";} | |
| my $CFG_VAL=""; | |
| if (exists($CONFIG{$PATH_TAG})) { | |
| $CFG_VAL=$CONFIG{$PATH_TAG}; | |
| if (uc($MODE) eq "CRON") { | |
| if (!exists($ROOTS{$PATH_TAG})) { | |
| $ROOTS{$PATH_TAG}=$CFG_VAL; | |
| } | |
| return $CFG_VAL; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment