This file is indexed.

/usr/share/perl5/Math/Calc/Units/Convert/Byte.pm is in libmath-calc-units-perl 1.07-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package Math::Calc::Units::Convert::Byte;
use base 'Math::Calc::Units::Convert::Base2Metric';
use strict;

my %units = ( bit => [ 1/8, 'byte' ] );
my %pref = ( bit => 0.1, default => 1 );
my %ranges = ( default => [ 1, 999 ] );

my %total_unit_map;

sub major_pref {
    return 1;
}

sub major_variants {
    my ($self) = @_;
    return $self->variants('byte');
}

sub get_ranges {
    return \%ranges;
}

sub get_prefs {
    return \%pref;
}

sub unit_map {
    my ($self) = @_;
    if (keys %total_unit_map == 0) {
	%total_unit_map = (%{$self->SUPER::unit_map()}, %units);
    }
    return \%total_unit_map;
}

sub canonical_unit { return 'byte'; }

sub abbreviated_canonical_unit { return 'B'; }

# simple_convert : unitName x unitName -> multiplier
#
sub simple_convert {
    my ($self, $from, $to) = @_;

    # 'b', 'byte', or 'bytes'
    return 1 if $from =~ /^b(yte(s?))?$/i;

    if (my $easy = $self->SUPER::simple_convert($from, $to)) {
	return $easy;
    }

    # mb == megabyte
    if ($from =~ /^(.)b(yte(s?))?$/i) {
	if (my ($prefix) = $self->expand($1)) {
	    return $self->simple_convert($prefix . "byte", $to);
	}
    }

    return; # Failed
}

1;