Include/hiew.pm untested

filter: Statementstmt 0.0% 0 / 11 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 16 CC 2 SCAR 15.4
CC
2
Cov
0%
hiew
6.0
BEGIN
2.0
CRAP 4.7
1 package hiew;
2 require Exporter;
3  
4 @hiew::ISA = 'Exporter';
5 @EXPORT = qw/hiew/;
6  
7 sub hiew(\$){
8 my $str = shift;
9 my @lines = unpack 'a16'x(length($$str)/16+(length($$str)%16?1:0)), $$str;
10  
11 for( 0..$#lines ){
12 printf "%08X: %-17s³ %-17s %-16s\n", $_*16,
13 (map{
14 sprintf '%-2s ' x 8, map{
15 sprintf'%02X',$_
16 }unpack 'C*', $_
17 }unpack 'a8a8', $lines[$_]),
18 $lines[$_];
19 }
20 }
21  
22 1;