/usr/share/perl5/inc/Module/Package.pm is in libmodule-package-perl 0.30-2.
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 63 64 65 66 67 68 69 | ##
# name: inc::Module::Package
# abstract: Module::Package Bootstrapper
# author: Ingy döt Net <ingy@ingy.net>
# license: perl
# copyright: 2011
# see:
# - Module::Package
package inc::Module::Package;
# Use BEGIN so unshift runs before use.
BEGIN {
# This version is here in case of emergencies.
$inc::Module::Package::VERSION = '0.30';
# Borrowed from inc::Module::Install...
my $author = $^O eq 'VMS' ? './inc/_author' : './inc/.author';
# Do this because inc::Module::Install does it. We don't ever call that.
$Module::Install::AUTHOR = 1
if -d $author or not(-d 'inc');
# Deleting the author's inc/ dir happens in Module::Install anyway,
# but doing it here prevents a subtle Module::Package bug.
if (-d $author) {
require File::Path;
File::Path::rmtree('inc');
}
# Make sure we pick up the local modules on user install.
unshift @INC, 'inc' unless $INC[0] eq 'inc';
}
# Bare block contains the 'main' scope.
{
# Pretend we are a Makefile.PL. Module::Install wants this.
package main;
# Load the real Module::Package.
use Module::Package ();
}
# Tell Module::Package to begin the magic.
sub import {
my $class = shift;
Module::Package->import(@_);
# Make sure we got the correct Module::Package.
# TODO: Need code review on this first. Might cause more harm than good.
# die "Module::Package Bootstrapping Error"
# unless $INC{'Module/Package.pm'} =~ /^inc/
# or -e 'inc/.author';
}
# Be true to your perl.
1;
=head1 SYNOPSIS
In you C<Makefile.PL>:
use inc::Module::Package <options>;
=head1 DESCRIPTION
This is the L<Module::Package> bootstrapping module. It works something like
L<inc::Module::Install>. This bootstrap module should only be loaded in an
author environment.
|