Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Stop using File::Slurp
it's not a core module, and more importantly, the error
message sucks when it's missing (because the TAP harness
swallows it up by default).
  • Loading branch information
moritz committed Jul 8, 2013
1 parent 5b21061 commit b5d98d9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/jvm/eval-client.pl
Expand Up @@ -3,9 +3,17 @@
use warnings;

use IO::Socket::INET;
use File::Slurp 'read_file';
use Encode ();

sub read_file {
my $filename = shift;
open my $IN, '<', $filename or die "Error while reading '$filename': $!";
local $/;
my $contents = <$IN>;
close $IN;
return $contents;
}

if (@ARGV < 2) {
print STDERR <<USAGE ;
Usage: tools/jvm/eval-client.pl TOKEN_FILE exit
Expand Down

0 comments on commit b5d98d9

Please sign in to comment.