Skip to content
Snippets Groups Projects
Commit 4587024d authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- changed order of extracted functions, to find them in BEGIN-block

parent f6fc75db
No related branches found
No related tags found
No related merge requests found
......@@ -20,15 +20,6 @@ our %config;
our %cache;
our $cache_path;
our $SALT = pack("H16", "There is no security by obscurity!");
BEGIN {
my $rx_psep = qr{[/\\]};
my $rx_abs = qr{[A-Z]:};
my $rx_sub = qr{([[:print:]]+)};
if ($ENV{'HOME'} =~ m{^(($rx_abs)?($rx_psep$rx_sub)+)$}m) {
load_config_if_possible($1);
load_cache_if_possible($1);
}
}
sub load_config_if_possible ($homestr) {
my $home = path($homestr);
......@@ -61,6 +52,16 @@ sub load_cache_if_possible ($homestr) {
return 1;
}
BEGIN {
my $rx_psep = qr{[/\\]};
my $rx_abs = qr{[A-Z]:};
my $rx_sub = qr{([[:print:]]+)};
if ($ENV{'HOME'} =~ m{^(($rx_abs)?($rx_psep$rx_sub)+)$}m) {
load_config_if_possible($1);
load_cache_if_possible($1);
}
}
sub _override_config ($override, $opt) {
#no warnings;
if (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment