diff --git a/lib/WebGUI/Paths.pm b/lib/WebGUI/Paths.pm index 69e03cf49..ef2dfc446 100644 --- a/lib/WebGUI/Paths.pm +++ b/lib/WebGUI/Paths.pm @@ -217,8 +217,9 @@ sub preloadAll { require WebGUI::Pluggable; + my @exclusions = $class->preloadExclude; WebGUI::Pluggable::findAndLoad( 'WebGUI', { - exclude => \( $class->preloadExclude ), + exclude => \@exclusions, onLoadFail => sub { warn sprintf "Error loading %s: %s\n", @_ }, }); } @@ -226,7 +227,7 @@ sub preloadAll { sub _readTextLines { my $file = shift; my @lines; - open my $fh, '<', $file or croak "Cannot open $file: $!"; + open my $fh, '<', $file or return; while (my $line = <$fh>) { $line =~ s/#.*//; $line =~ s/^\s+//;