diff options
Diffstat (limited to 'lib/Unicode')
-rw-r--r-- | lib/Unicode/Collate.pm | 6 | ||||
-rw-r--r-- | lib/Unicode/UCD.t | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Unicode/Collate.pm b/lib/Unicode/Collate.pm index 676a3aadfe..51c290ec87 100644 --- a/lib/Unicode/Collate.pm +++ b/lib/Unicode/Collate.pm @@ -10,6 +10,7 @@ use 5.006; use strict; use warnings; use Carp; +use File::Spec; require Exporter; @@ -151,8 +152,9 @@ sub read_table { my $self = shift; my $file = $self->{table} ne '' ? $self->{table} : $KeyFile; - open my $fk, "<$Path/$file" - or croak "File does not exist at $Path/$file"; + my $filepath = File::Spec->catfile($Path, $file); + open my $fk, "<$filepath" + or croak "File does not exist at $filepath"; while (<$fk>) { next if /^\s*#/; diff --git a/lib/Unicode/UCD.t b/lib/Unicode/UCD.t index 0e1550e289..9082057bbd 100644 --- a/lib/Unicode/UCD.t +++ b/lib/Unicode/UCD.t @@ -5,6 +5,7 @@ BEGIN { } chdir 't' if -d 't'; @INC = '../lib'; + @INC = "::lib" if $^O eq 'MacOS'; # module parses @INC itself } use strict; |