code cleanup to WebGUI::Paths
This commit is contained in:
parent
6cbdc3272c
commit
a484fb126d
2 changed files with 19 additions and 8 deletions
|
|
@ -103,13 +103,15 @@ sub preloadPaths {
|
|||
my $class = shift;
|
||||
my @paths;
|
||||
try {
|
||||
@paths = grep {
|
||||
(-d) ? 1 : do {
|
||||
warn "WARNING: Not adding lib directory '$_' from "
|
||||
. $class->preloadCustom . ": Directory does not exist.\n";
|
||||
0;
|
||||
for my $path ( _readTextLines($class->preloadCustom) ) {
|
||||
if (-d $path) {
|
||||
push @paths, $path;
|
||||
}
|
||||
} _readTextLines($class->preloadCustom);
|
||||
else {
|
||||
warn "WARNING: Not adding lib directory '$path' from "
|
||||
. $class->preloadCustom . ": Directory does not exist.\n";
|
||||
}
|
||||
}
|
||||
};
|
||||
return @paths;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue