Verified Commit 6e670a7a authored by Karel Koci's avatar Karel Koci 🤘
Browse files

utils/xxdi.pl: remove dependency on File::Slurp

parent 6b57800e
Pipeline #64423 passed with stages
in 8 minutes and 46 seconds
......@@ -38,7 +38,6 @@ AC_LINK_IFELSE(
AC_PATH_PROG([PERL], [perl])
AS_IF([test -z "$PERL"], [AC_MSG_ERROR([Missing perl interpreter])])
AX_PROG_PERL_MODULES([File::Slurp], , AC_MSG_ERROR(Perl modules File::Slurp is required))
AC_PATH_PROG([XXDI], [xxdi.pl],, [$ac_abs_confdir/utils])
AS_IF([test -z "$XXDI"], [AC_MSG_ERROR([Not able to locate xxdi.pl])])
......
......@@ -14,12 +14,15 @@
use strict;
use warnings;
use File::Slurp qw(slurp);
die "Usage: xddi.pl VARIABLE_NAME INPUT OUTPUT" unless @ARGV == 3;
my $var_name = $ARGV[0];
my $indata = slurp($ARGV[1]);
my $indata = do {
local $/;
open my $f, "<", $ARGV[1] or die "Could not open input $ARGV[1]: $!\n";
<$f>;
};
my $len_data = length($indata);
my $num_digits_per_line = 12;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment