/usr/share/perl5/perl5i/2/RequireMessage.pm is in libperl5i-perl 2.13.2-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 | package perl5i::2::RequireMessage;
use strict;
use warnings;
# This is the sub that displays the message
my $diesub = sub {
my ( $sub, $mod ) = @_;
my $hints = (caller(0))[10];
return unless $hints->{perl5i};
die( <<EOT );
Can't locate $mod in your Perl library. You may need to install it
from CPAN or another repository. Your library paths are:
@{[ map { " $_\n" } grep { !ref($_) } @INC ]}
EOT
};
# This sub makes sure the die sub is always at the end of @INC.
push @INC => sub {
return if ref($INC[-1]) && $INC[-1] == $diesub;
@INC = grep { !(ref($_) && $_ == $diesub) } @INC;
push @INC => $diesub;
};
push @INC => $diesub;
1;
|