SIGN => 1,
EXE_FILES => [ 'bin/bro-perl' ],
PREREQ_PM => {
- 'File::Slurp' => '0',
- 'Getopt::Long' => '0',
- 'Time::HiRes' => '0',
+ 'File::Slurper' => '0',
+ 'Getopt::Long' => '0',
+ 'Time::HiRes' => '0',
},
BUILD_REQUIRES => {},
INC => '-Ibrotli/c/include',
This module requires these other modules and libraries:
-* File::Slurp
+* File::Slurper
Additionally, it requires a C compiler.
use bytes ();
-use File::Slurp;
+use File::Slurper qw/read_binary/;
use Getopt::Long;
use Time::HiRes qw/ gettimeofday tv_interval /;
print $ofh $encoded;
}
else {
- my $decoded = read_file( $ifh );
+ my $decoded = read_binary( $ifh );
my $encoded = bro( $decoded, $QUALITY, $WINDOW );
$total_size += bytes::length( $decoded );
write_file( $ofh, $encoded );
use warnings;
use Test::More tests => 84;
-use File::Slurp;
+use File::Slurper qw/read_binary/;
use IO::Uncompress::Brotli;
for my $test (<brotli/tests/testdata/*.compressed*>) {
my ($expected) = $test =~ s/\.compressed.*//r;
- $expected = read_file $expected;
+ $expected = read_binary $expected;
- my $decoded = unbro ((scalar read_file $test), 1_000_000);
+ my $decoded = unbro ((scalar read_binary $test), 1_000_000);
is $decoded, $expected, "$test";
open FH, '<', $test;
use warnings;
use Test::More tests => 114;
-use File::Slurp;
+use File::Slurper qw/read_binary/;
use IO::Compress::Brotli;
use IO::Uncompress::Brotli;
for my $test (<brotli/tests/testdata/*.compressed>) {
my ($source) = $test =~ s/\.compressed$//r;
- $source = read_file $source;
+ $source = read_binary $source;
for my $quality (9,11) {
my $encoded = bro($source, $quality);