Skip to content

Commit

Permalink
Use open_backend instead of open
Browse files Browse the repository at this point in the history
  • Loading branch information
choroba committed May 16, 2024
1 parent 406d140 commit 73adafa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ud/libs/Treex/PML/Backend/UD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Treex::PML::IO qw{ open_backend close_backend };

sub test {
my ($filename, $encoding) = @_;
open my $in, '<', $filename or die "$filename: $!";
my $in = open_backend($filename, 'r', $encoding) or die "$filename: $!";
while (<$in>) {
return unless /^#/;
return 1 if /^# (?:new(?:doc|par)\s+id|sent_id|text)(?: =)? ./;
Expand Down

0 comments on commit 73adafa

Please sign in to comment.