Allow portability of config files between Unix and Windows

This commit is contained in:
Alessandro Ranellucci 2012-01-22 20:10:23 +01:00
parent 811e22a431
commit 5bc3f2cfa5

View File

@ -321,8 +321,10 @@ sub load {
my $class = shift; my $class = shift;
my ($file) = @_; my ($file) = @_;
local $/ = "\n";
open my $fh, '<', $file; open my $fh, '<', $file;
while (<$fh>) { while (<$fh>) {
s/\R+$//;
next if /^\s+/; next if /^\s+/;
next if /^$/; next if /^$/;
next if /^\s*#/; next if /^\s*#/;