more WebGUI::Paths fixes

This commit is contained in:
Graham Knop 2010-04-19 11:01:39 -05:00
parent 033b4d7c0b
commit 9c613ab638

View file

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