Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
# $Id$
package ExtUtils::MakeMaker;
use strict;
BEGIN {require 5.006;}
require Exporter;
use ExtUtils::MakeMaker::Config;
use version; # ensure we always have version.pm
use Carp;
use File::Path;
my $CAN_DECODE = eval { require Encode::Locale; }; # 2 birds, 1 stone
eval { Encode::Locale::reinit('UTF-8') }
if $CAN_DECODE and Encode::find_encoding('locale')->name eq 'ascii';
our $Verbose = 0; # exported
our @Parent; # needs to be localized
our @Get_from_Config; # referenced by MM_Unix
our @MM_Sections;
our @Overridable;
my @Prepend_parent;
my %Recognized_Att_Keys;
our %macro_fsentity; # whether a macro is a filesystem name
our %macro_dep; # whether a macro is a dependency
our $VERSION = '7.34';
$VERSION = eval $VERSION; ## no critic [BuiltinFunctions::ProhibitStringyEval]
# Emulate something resembling CVS $Revision$
(our $Revision = $VERSION) =~ s{_}{};
$Revision = int $Revision * 10000;
our $Filename = __FILE__; # referenced outside MakeMaker
our @ISA = qw(Exporter);
our @EXPORT = qw(&WriteMakefile $Verbose &prompt &os_unsupported);
our @EXPORT_OK = qw($VERSION &neatvalue &mkbootstrap &mksymlists
&WriteEmptyMakefile &open_for_writing &write_file_via_tmp
&_sprintf562);
# These will go away once the last of the Win32 & VMS specific code is
# purged.
my $Is_VMS = $^O eq 'VMS';
my $Is_Win32 = $^O eq 'MSWin32';
our $UNDER_CORE = $ENV{PERL_CORE}; # needs to be our
full_setup();
require ExtUtils::MM; # Things like CPAN assume loading ExtUtils::MakeMaker
# will give them MM.
require ExtUtils::MY; # XXX pre-5.8 versions of ExtUtils::Embed expect
# loading ExtUtils::MakeMaker will give them MY.
# This will go when Embed is its own CPAN module.
# 5.6.2 can't do sprintf "%1$s" - this can only do %s
sub _sprintf562 {
my ($format, @args) = @_;
for (my $i = 1; $i <= @args; $i++) {
$format =~ s#%$i\$s#$args[$i-1]#g;
}
$format;
}
sub WriteMakefile {
croak "WriteMakefile: Need even number of args" if @_ % 2;
require ExtUtils::MY;
my %att = @_;
_convert_compat_attrs(\%att);
_verify_att(\%att);
my $mm = MM->new(\%att);
$mm->flush;
return $mm;
}
# Basic signatures of the attributes WriteMakefile takes. Each is the
# reference type. Empty value indicate it takes a non-reference
# scalar.
my %Att_Sigs;
my %Special_Sigs = (
AUTHOR => 'ARRAY',
C => 'ARRAY',
CONFIG => 'ARRAY',
CONFIGURE => 'CODE',
DIR => 'ARRAY',
DL_FUNCS => 'HASH',
DL_VARS => 'ARRAY',
EXCLUDE_EXT => 'ARRAY',
EXE_FILES => 'ARRAY',
FUNCLIST => 'ARRAY',
H => 'ARRAY',
IMPORTS => 'HASH',
INCLUDE_EXT => 'ARRAY',
LIBS => ['ARRAY',''],
MAN1PODS => 'HASH',
MAN3PODS => 'HASH',
META_ADD => 'HASH',
META_MERGE => 'HASH',
OBJECT => ['ARRAY', ''],
PL_FILES => 'HASH',
PM => 'HASH',
PMLIBDIRS => 'ARRAY',
PMLIBPARENTDIRS => 'ARRAY',
PREREQ_PM => 'HASH',
BUILD_REQUIRES => 'HASH',
CONFIGURE_REQUIRES => 'HASH',
TEST_REQUIRES => 'HASH',
SKIP => 'ARRAY',
TYPEMAPS => 'ARRAY',
XS => 'HASH',
XSBUILD => 'HASH',
VERSION => ['version',''],
_KEEP_AFTER_FLUSH => '',
clean => 'HASH',
depend => 'HASH',
dist => 'HASH',
dynamic_lib=> 'HASH',
linkext => 'HASH',
macro => 'HASH',
postamble => 'HASH',
realclean => 'HASH',
test => 'HASH',
tool_autosplit => 'HASH',
);
@Att_Sigs{keys %Recognized_Att_Keys} = ('') x keys %Recognized_Att_Keys;
@Att_Sigs{keys %Special_Sigs} = values %Special_Sigs;
sub _convert_compat_attrs { #result of running several times should be same
my($att) = @_;
if (exists $att->{AUTHOR}) {
if ($att->{AUTHOR}) {
if (!ref($att->{AUTHOR})) {
my $t = $att->{AUTHOR};
$att->{AUTHOR} = [$t];
}
} else {
$att->{AUTHOR} = [];
}
}
}
sub _verify_att {
my($att) = @_;
foreach my $key (sort keys %$att) {
my $val = $att->{$key};
my $sig = $Att_Sigs{$key};
unless( defined $sig ) {
warn "WARNING: $key is not a known parameter.\n";
next;
}
my @sigs = ref $sig ? @$sig : $sig;
my $given = ref $val;
unless( grep { _is_of_type($val, $_) } @sigs ) {
my $takes = join " or ", map { _format_att($_) } @sigs;
my $has = _format_att($given);
warn "WARNING: $key takes a $takes not a $has.\n".
" Please inform the author.\n";
}
}
}
# Check if a given thing is a reference or instance of $type
sub _is_of_type {
my($thing, $type) = @_;
return 1 if ref $thing eq $type;
local $SIG{__DIE__};
return 1 if eval{ $thing->isa($type) };
return 0;
}
sub _format_att {
my $given = shift;
return $given eq '' ? "string/number"
: uc $given eq $given ? "$given reference"
: "$given object"
;
}
sub prompt ($;$) { ## no critic
my($mess, $def) = @_;
confess("prompt function called without an argument")
unless defined $mess;
my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)) ;
my $dispdef = defined $def ? "[$def] " : " ";
$def = defined $def ? $def : "";
local $|=1;
local $\;
print "$mess $dispdef";
my $ans;
if ($ENV{PERL_MM_USE_DEFAULT} || (!$isa_tty && eof STDIN)) {
print "$def\n";
}
else {
$ans = ;
if( defined $ans ) {
$ans =~ s{\015?\012$}{};
}
else { # user hit ctrl-D
print "\n";
}
}
return (!defined $ans || $ans eq '') ? $def : $ans;
}
sub os_unsupported {
die "OS unsupported\n";
}
sub eval_in_subdirs {
my($self) = @_;
use Cwd qw(cwd abs_path);
my $pwd = cwd() || die "Can't figure out your cwd!";
local @INC = map eval {abs_path($_) if -e} || $_, @INC;
push @INC, '.'; # '.' has to always be at the end of @INC
foreach my $dir (@{$self->{DIR}}){
my($abs) = $self->catdir($pwd,$dir);
eval { $self->eval_in_x($abs); };
last if $@;
}
chdir $pwd;
die $@ if $@;
}
sub eval_in_x {
my($self,$dir) = @_;
chdir $dir or carp("Couldn't change to directory $dir: $!");
{
package main;
do './Makefile.PL';
};
if ($@) {
# if ($@ =~ /prerequisites/) {
# die "MakeMaker WARNING: $@";
# } else {
# warn "WARNING from evaluation of $dir/Makefile.PL: $@";
# }
die "ERROR from evaluation of $dir/Makefile.PL: $@";
}
}
# package name for the classes into which the first object will be blessed
my $PACKNAME = 'PACK000';
sub full_setup {
$Verbose ||= 0;
my @dep_macros = qw/
PERL_INCDEP PERL_ARCHLIBDEP PERL_ARCHIVEDEP
/;
my @fs_macros = qw/
FULLPERL XSUBPPDIR
INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR
INSTALLDIRS
DESTDIR PREFIX INSTALL_BASE
PERLPREFIX SITEPREFIX VENDORPREFIX
INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB
INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH
INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN
INSTALLMAN1DIR INSTALLMAN3DIR
INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR
INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR
INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT
PERL_LIB PERL_ARCHLIB
SITELIBEXP SITEARCHEXP
MAKE LIBPERL_A LIB PERL_SRC PERL_INC
PPM_INSTALL_EXEC PPM_UNINSTALL_EXEC
PPM_INSTALL_SCRIPT PPM_UNINSTALL_SCRIPT
/;
my @attrib_help = qw/
AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DISTVNAME
DL_FUNCS DL_VARS
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE
FULLPERLRUN FULLPERLRUNINST
FUNCLIST H IMPORTS
INC INCLUDE_EXT LDFROM LIBS LICENSE
LINKTYPE MAKEAPERL MAKEFILE MAKEFILE_OLD MAN1PODS MAN3PODS MAP_TARGET
META_ADD META_MERGE MIN_PERL_VERSION BUILD_REQUIRES CONFIGURE_REQUIRES
MYEXTLIB NAME NEEDS_LINKING NOECHO NO_META NO_MYMETA NO_PACKLIST NO_PERLLOCAL
NORECURS NO_VC OBJECT OPTIMIZE PERL_MALLOC_OK PERL PERLMAINCC PERLRUN
PERLRUNINST PERL_CORE
PERM_DIR PERM_RW PERM_RWX MAGICXS
PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE
PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
SIGN SKIP TEST_REQUIRES TYPEMAPS UNINST USE_MM_LD_RUN_PATH VERSION VERSION_FROM XS
XSBUILD XSMULTI XSOPT XSPROTOARG XS_VERSION
clean depend dist dynamic_lib linkext macro realclean tool_autosplit
MAN1EXT MAN3EXT
MACPERL_SRC MACPERL_LIB MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC
MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED
/;
push @attrib_help, @fs_macros;
@macro_fsentity{@fs_macros, @dep_macros} = (1) x (@fs_macros+@dep_macros);
@macro_dep{@dep_macros} = (1) x @dep_macros;
# IMPORTS is used under OS/2 and Win32
# @Overridable is close to @MM_Sections but not identical. The
# order is important. Many subroutines declare macros. These
# depend on each other. Let's try to collect the macros up front,
# then pasthru, then the rules.
# MM_Sections are the sections we have to call explicitly
# in Overridable we have subroutines that are used indirectly
@MM_Sections =
qw(
post_initialize const_config constants platform_constants
tool_autosplit tool_xsubpp tools_other
makemakerdflt
dist macro depend cflags const_loadlibs const_cccmd
post_constants
pasthru
special_targets
c_o xs_c xs_o
top_targets blibdirs linkext dlsyms dynamic_bs dynamic
dynamic_lib static static_lib manifypods processPL
installbin subdirs
clean_subdirs clean realclean_subdirs realclean
metafile signature
dist_basics dist_core distdir dist_test dist_ci distmeta distsignature
install force perldepend makefile staticmake test ppd
); # loses section ordering
@Overridable = @MM_Sections;
push @Overridable, qw[
libscan makeaperl needs_linking
subdir_x test_via_harness test_via_script
init_VERSION init_dist init_INST init_INSTALL init_DEST init_dirscan
init_PM init_MANPODS init_xs init_PERL init_DIRFILESEP init_linker
];
push @MM_Sections, qw[
pm_to_blib selfdocument
];
# Postamble needs to be the last that was always the case
push @MM_Sections, "postamble";
push @Overridable, "postamble";
# All sections are valid keys.
@Recognized_Att_Keys{@MM_Sections} = (1) x @MM_Sections;
# we will use all these variables in the Makefile
@Get_from_Config =
qw(
ar cc cccdlflags ccdlflags dlext dlsrc exe_ext full_ar ld
lddlflags ldflags libc lib_ext obj_ext osname osvers ranlib
sitelibexp sitearchexp so
);
# 5.5.3 doesn't have any concept of vendor libs
push @Get_from_Config, qw( vendorarchexp vendorlibexp ) if $] >= 5.006;
foreach my $item (@attrib_help){
$Recognized_Att_Keys{$item} = 1;
}
foreach my $item (@Get_from_Config) {
$Recognized_Att_Keys{uc $item} = $Config{$item};
print "Attribute '\U$item\E' => '$Config{$item}'\n"
if ($Verbose >= 2);
}
#
# When we eval a Makefile.PL in a subdirectory, that one will ask
# us (the parent) for the values and will prepend "..", so that
# all files to be installed end up below OUR ./blib
#
@Prepend_parent = qw(
INST_BIN INST_LIB INST_ARCHLIB INST_SCRIPT
MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC
PERL FULLPERL
);
}
sub _has_cpan_meta_requirements {
return eval {
require CPAN::Meta::Requirements;
CPAN::Meta::Requirements->VERSION(2.130);
require B; # CMR requires this, for core we have to too.
};
}
sub new {
my($class,$self) = @_;
my($key);
_convert_compat_attrs($self) if defined $self && $self;
# Store the original args passed to WriteMakefile()
foreach my $k (keys %$self) {
$self->{ARGS}{$k} = $self->{$k};
}
$self = {} unless defined $self;
# Temporarily bless it into MM so it can be used as an
# object. It will be blessed into a temp package later.
bless $self, "MM";
# Cleanup all the module requirement bits
my %key2cmr;
for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) {
$self->{$key} ||= {};
if (_has_cpan_meta_requirements) {
my $cmr = CPAN::Meta::Requirements->from_string_hash(
$self->{$key},
{
bad_version_hook => sub {
#no warnings 'numeric'; # module doesn't use warnings
my $fallback;
if ( $_[0] =~ m!^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$! ) {
$fallback = sprintf "%f", $_[0];
} else {
($fallback) = $_[0] ? ($_[0] =~ /^([0-9.]+)/) : 0;
$fallback += 0;
carp "Unparsable version '$_[0]' for prerequisite $_[1] treated as $fallback";
}
version->new($fallback);
},
},
);
$self->{$key} = $cmr->as_string_hash;
$key2cmr{$key} = $cmr;
} else {
for my $module (sort keys %{ $self->{$key} }) {
my $version = $self->{$key}->{$module};
my $fallback = 0;
if (!defined($version) or !length($version)) {
carp "Undefined requirement for $module treated as '0' (CPAN::Meta::Requirements not available)";
}
elsif ($version =~ /^\d+(?:\.\d+(?:_\d+)*)?$/) {
next;
}
else {
if ( $version =~ m!^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$! ) {
$fallback = sprintf "%f", $version;
} else {
($fallback) = $version ? ($version =~ /^([0-9.]+)/) : 0;
$fallback += 0;
carp "Unparsable version '$version' for prerequisite $module treated as $fallback (CPAN::Meta::Requirements not available)";
}
}
$self->{$key}->{$module} = $fallback;
}
}
}
if ("@ARGV" =~ /\bPREREQ_PRINT\b/) {
$self->_PREREQ_PRINT;
}
# PRINT_PREREQ is RedHatism.
if ("@ARGV" =~ /\bPRINT_PREREQ\b/) {
$self->_PRINT_PREREQ;
}
# USE_MM_LD_RUN_PATH - another RedHatism to disable automatic RPATH generation
if ( ( ! $self->{USE_MM_LD_RUN_PATH} )
&&( ("@ARGV" =~ /\bUSE_MM_LD_RUN_PATH(=([01]))?\b/)
||( exists( $ENV{USE_MM_LD_RUN_PATH} )
&&( $ENV{USE_MM_LD_RUN_PATH} =~ /([01])?$/ )
)
)
)
{
my $v = $1;
if( $v )
{
$v = ($v=~/=([01])$/)[0];
}else
{
$v = 1;
};
$self->{USE_MM_LD_RUN_PATH}=$v;
};
print "MakeMaker (v$VERSION)\n" if $Verbose;
if (-f "MANIFEST" && ! -f "Makefile" && ! $UNDER_CORE){
check_manifest();
}
check_hints($self);
if ( defined $self->{MIN_PERL_VERSION}
&& $self->{MIN_PERL_VERSION} !~ /^v?[\d_\.]+$/ ) {
require version;
my $normal = eval {
local $SIG{__WARN__} = sub {
# simulate "use warnings FATAL => 'all'" for vintage perls
die @_;
};
version->new( $self->{MIN_PERL_VERSION} )
};
$self->{MIN_PERL_VERSION} = $normal if defined $normal && !$@;
}
# Translate X.Y.Z to X.00Y00Z
if( defined $self->{MIN_PERL_VERSION} ) {
$self->{MIN_PERL_VERSION} =~ s{ ^v? (\d+) \. (\d+) \. (\d+) $ }
{sprintf "%d.%03d%03d", $1, $2, $3}ex;
}
my $perl_version_ok = eval {
local $SIG{__WARN__} = sub {
# simulate "use warnings FATAL => 'all'" for vintage perls
die @_;
};
!$self->{MIN_PERL_VERSION} or $self->{MIN_PERL_VERSION} <= $]
};
if (!$perl_version_ok) {
if (!defined $perl_version_ok) {
die <<'END';
Warning: MIN_PERL_VERSION is not in a recognized format.
Recommended is a quoted numerical value like '5.005' or '5.008001'.
END
}
elsif ($self->{PREREQ_FATAL}) {
die sprintf <<"END", $self->{MIN_PERL_VERSION}, $];
MakeMaker FATAL: perl version too low for this distribution.
Required is %s. We run %s.
END
}
else {
warn sprintf
"Warning: Perl version %s or higher required. We run %s.\n",
$self->{MIN_PERL_VERSION}, $];
}
}
my %configure_att; # record &{$self->{CONFIGURE}} attributes
my(%initial_att) = %$self; # record initial attributes
my(%unsatisfied) = ();
my %prereq2version;
my $cmr;
if (_has_cpan_meta_requirements) {
$cmr = CPAN::Meta::Requirements->new;
for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) {
$cmr->add_requirements($key2cmr{$key}) if $key2cmr{$key};
}
foreach my $prereq ($cmr->required_modules) {
$prereq2version{$prereq} = $cmr->requirements_for_module($prereq);
}
} else {
for my $key (qw(PREREQ_PM BUILD_REQUIRES CONFIGURE_REQUIRES TEST_REQUIRES)) {
next unless my $module2version = $self->{$key};
$prereq2version{$_} = $module2version->{$_} for keys %$module2version;
}
}
foreach my $prereq (sort keys %prereq2version) {
my $required_version = $prereq2version{$prereq};
my $pr_version = 0;
my $installed_file;
if ( $prereq eq 'perl' ) {
if ( defined $required_version && $required_version =~ /^v?[\d_\.]+$/
|| $required_version !~ /^v?[\d_\.]+$/ ) {
require version;
my $normal = eval { version->new( $required_version ) };
$required_version = $normal if defined $normal;
}
$installed_file = $prereq;
$pr_version = $];
}
else {
$installed_file = MM->_installed_file_for_module($prereq);
$pr_version = MM->parse_version($installed_file) if $installed_file;
$pr_version = 0 if $pr_version eq 'undef';
if ( !eval { version->new( $pr_version ); 1 } ) {
#no warnings 'numeric'; # module doesn't use warnings
my $fallback;
if ( $pr_version =~ m!^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$! ) {
$fallback = sprintf '%f', $pr_version;
} else {
($fallback) = $pr_version ? ($pr_version =~ /^([0-9.]+)/) : 0;
$fallback += 0;
carp "Unparsable version '$pr_version' for installed prerequisite $prereq treated as $fallback";
}
$pr_version = $fallback;
}
}
# convert X.Y_Z alpha version #s to X.YZ for easier comparisons
$pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/;
if (!$installed_file) {
warn sprintf "Warning: prerequisite %s %s not found.\n",
$prereq, $required_version
unless $self->{PREREQ_FATAL}
or $UNDER_CORE;
$unsatisfied{$prereq} = 'not installed';
}
elsif (
$cmr
? !$cmr->accepts_module($prereq, $pr_version)
: $required_version > $pr_version
) {
warn sprintf "Warning: prerequisite %s %s not found. We have %s.\n",
$prereq, $required_version, ($pr_version || 'unknown version')
unless $self->{PREREQ_FATAL}
or $UNDER_CORE;
$unsatisfied{$prereq} = $required_version || 'unknown version' ;
}
}
if (%unsatisfied && $self->{PREREQ_FATAL}){
my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
sort { $a cmp $b } keys %unsatisfied;
die <<"END";
MakeMaker FATAL: prerequisites not found.
$failedprereqs
Please install these modules first and rerun 'perl Makefile.PL'.
END
}
if (defined $self->{CONFIGURE}) {
if (ref $self->{CONFIGURE} eq 'CODE') {
%configure_att = %{&{$self->{CONFIGURE}}};
_convert_compat_attrs(\%configure_att);
$self = { %$self, %configure_att };
} else {
croak "Attribute 'CONFIGURE' to WriteMakefile() not a code reference\n";
}
}
my $newclass = ++$PACKNAME;
local @Parent = @Parent; # Protect against non-local exits
{
print "Blessing Object into class [$newclass]\n" if $Verbose>=2;
mv_all_methods("MY",$newclass);
bless $self, $newclass;
push @Parent, $self;
require ExtUtils::MY;
no strict 'refs'; ## no critic;
@{"$newclass\:\:ISA"} = 'MM';
}
if (defined $Parent[-2]){
$self->{PARENT} = $Parent[-2];
for my $key (@Prepend_parent) {
next unless defined $self->{PARENT}{$key};
# Don't stomp on WriteMakefile() args.
next if defined $self->{ARGS}{$key} and
$self->{ARGS}{$key} eq $self->{$key};
$self->{$key} = $self->{PARENT}{$key};
if ($Is_VMS && $key =~ /PERL$/) {
# PERL or FULLPERL will be a command verb or even a
# command with an argument instead of a full file
# specification under VMS. So, don't turn the command
# into a filespec, but do add a level to the path of
# the argument if not already absolute.
my @cmd = split /\s+/, $self->{$key};
$cmd[1] = $self->catfile('[-]',$cmd[1])
unless (@cmd < 2) || $self->file_name_is_absolute($cmd[1]);
$self->{$key} = join(' ', @cmd);
} else {
my $value = $self->{$key};
# not going to test in FS so only stripping start
$value =~ s/^"// if $key =~ /PERL$/;
$value = $self->catdir("..", $value)
unless $self->file_name_is_absolute($value);
$value = qq{"$value} if $key =~ /PERL$/;
$self->{$key} = $value;
}
}
if ($self->{PARENT}) {
$self->{PARENT}->{CHILDREN}->{$newclass} = $self;
foreach my $opt (qw(POLLUTE PERL_CORE LINKTYPE LD OPTIMIZE)) {
if (exists $self->{PARENT}->{$opt}
and not exists $self->{$opt})
{
# inherit, but only if already unspecified
$self->{$opt} = $self->{PARENT}->{$opt};
}
}
}
my @fm = grep /^FIRST_MAKEFILE=/, @ARGV;
parse_args($self,@fm) if @fm;
}
else {
parse_args($self, _shellwords($ENV{PERL_MM_OPT} || ''),@ARGV);
}
# RT#91540 PREREQ_FATAL not recognized on command line
if (%unsatisfied && $self->{PREREQ_FATAL}){
my $failedprereqs = join "\n", map {" $_ $unsatisfied{$_}"}
sort { $a cmp $b } keys %unsatisfied;
die <<"END";
MakeMaker FATAL: prerequisites not found.
$failedprereqs
Please install these modules first and rerun 'perl Makefile.PL'.
END
}
$self->{NAME} ||= $self->guess_name;
warn "Warning: NAME must be a package name\n"
unless $self->{NAME} =~ m!^[A-Z_a-z][0-9A-Z_a-z]*(?:::[0-9A-Z_a-z]+)*$!;
($self->{NAME_SYM} = $self->{NAME}) =~ s/\W+/_/g;
$self->init_MAKE;
$self->init_main;
$self->init_VERSION;
$self->init_dist;
$self->init_INST;
$self->init_INSTALL;
$self->init_DEST;
$self->init_dirscan;
$self->init_PM;
$self->init_MANPODS;
$self->init_xs;
$self->init_PERL;
$self->init_DIRFILESEP;
$self->init_linker;
$self->init_ABSTRACT;
$self->arch_check(
$INC{'Config.pm'},
$self->catfile($Config{'archlibexp'}, "Config.pm")
);
$self->init_tools();
$self->init_others();
$self->init_platform();
$self->init_PERM();
my @args = @ARGV;
@args = map { Encode::decode(locale => $_) } @args if $CAN_DECODE;
my($argv) = neatvalue(\@args);
$argv =~ s/^\[/(/;
$argv =~ s/\]$/)/;
push @{$self->{RESULT}}, <{NAME} extension to perl.
#
# It was generated automatically by MakeMaker version
# $VERSION (Revision: $Revision) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
# ANY CHANGES MADE HERE WILL BE LOST!
#
# MakeMaker ARGV: $argv
#
END
push @{$self->{RESULT}}, $self->_MakeMaker_Parameters_section(\%initial_att);
if (defined $self->{CONFIGURE}) {
push @{$self->{RESULT}}, < 0) {
foreach my $key (sort keys %configure_att){
next if $key eq 'ARGS';
my($v) = neatvalue($configure_att{$key});
$v =~ s/(CODE|HASH|ARRAY|SCALAR)\([\dxa-f]+\)/$1\(...\)/;
$v =~ tr/\n/ /s;
push @{$self->{RESULT}}, "# $key => $v";
}
}
else
{
push @{$self->{RESULT}}, "# no values returned";
}
undef %configure_att; # free memory
}
# turn the SKIP array into a SKIPHASH hash
for my $skip (@{$self->{SKIP} || []}) {
$self->{SKIPHASH}{$skip} = 1;
}
delete $self->{SKIP}; # free memory
if ($self->{PARENT}) {
for (qw/install dist dist_basics dist_core distdir dist_test dist_ci/) {
$self->{SKIPHASH}{$_} = 1;
}
}
# We run all the subdirectories now. They don't have much to query
# from the parent, but the parent has to query them: if they need linking!
unless ($self->{NORECURS}) {
$self->eval_in_subdirs if @{$self->{DIR}};
}
foreach my $section ( @MM_Sections ){
# Support for new foo_target() methods.
my $method = $section;
$method .= '_target' unless $self->can($method);
print "Processing Makefile '$section' section\n" if ($Verbose >= 2);
my($skipit) = $self->skipcheck($section);
if ($skipit){
push @{$self->{RESULT}}, "\n# --- MakeMaker $section section $skipit.";
} else {
my(%a) = %{$self->{$section} || {}};
push @{$self->{RESULT}}, "\n# --- MakeMaker $section section:";
push @{$self->{RESULT}}, "# " . join ", ", %a if $Verbose && %a;
push @{$self->{RESULT}}, $self->maketext_filter(
$self->$method( %a )
);
}
}
push @{$self->{RESULT}}, "\n# End.";
$self;
}
sub WriteEmptyMakefile {
croak "WriteEmptyMakefile: Need an even number of args" if @_ % 2;
my %att = @_;
$att{DIR} = [] unless $att{DIR}; # don't recurse by default
my $self = MM->new(\%att);
my $new = $self->{MAKEFILE};
my $old = $self->{MAKEFILE_OLD};
if (-f $old) {
_unlink($old) or warn "unlink $old: $!";
}
if ( -f $new ) {
_rename($new, $old) or warn "rename $new => $old: $!"
}
open my $mfh, '>', $new or die "open $new for write: $!";
print $mfh <<'EOP';
all :
manifypods :
subdirs :
dynamic :
static :
clean :
install :
makemakerdflt :
test :
test_dynamic :
test_static :
EOP
close $mfh or die "close $new for write: $!";
}
=begin private
=head3 _installed_file_for_module
my $file = MM->_installed_file_for_module($module);
Return the first installed .pm $file associated with the $module. The
one which will show up when you C