@@ -431,44 +431,35 @@ sub new {
431
431
} else {
432
432
$self = {};
433
433
}
434
-
435
434
setup_MY($self , ++$PACKNAME ); # blesses
436
435
436
+ $self -> extract_hints;
437
+ local @Parent = @Parent ; # Protect against non-local exits
438
+ $self -> extract_PARENT;
439
+ $self -> extract_ARGV(\@ARGV );
440
+ $self -> {NAME } ||= $self -> guess_name;
441
+ warn " Warning: NAME must be a package name\n "
442
+ unless $self -> {NAME } =~ m ! ^[A-Z_a-z][0-9A-Z_a-z] *(?:::[0-9A-Z_a-z]+)*$ ! ;
443
+ ($self -> {NAME_SYM } = $self -> {NAME }) =~ s /\W +/ _/ g ;
444
+
437
445
# Cleanup all the module requirement bits
438
446
my $cmrstash = $self -> clean_versions;
439
-
440
447
$self -> _PREREQ_PRINT if " @ARGV " =~ / \b PREREQ_PRINT\b / ;
441
448
$self -> _PRINT_PREREQ if " @ARGV " =~ / \b PRINT_PREREQ\b / ; # RedHatism.
442
-
443
449
if (-f " MANIFEST" && ! -f " Makefile" && ! $ENV {PERL_CORE }) {
444
450
check_manifest();
445
451
}
446
-
447
- $self -> extract_hints;
448
-
449
452
$self -> check_min_perl_version;
450
453
my $unsatisfied_prereqs = $self -> check_prereqs($cmrstash );
451
- my ($initial_att , $configure_att ) = $self -> extract_CONFIGURE;
452
-
453
- local @Parent = @Parent ; # Protect against non-local exits
454
- $self -> extract_PARENT;
455
-
456
- $self -> extract_ARGV(\@ARGV );
457
-
458
454
$self -> check_PREREQ_FATAL($unsatisfied_prereqs ); # after ARGV processed
459
-
460
- $self -> {NAME } ||= $self -> guess_name;
461
- warn " Warning: NAME must be a package name\n "
462
- unless $self -> {NAME } =~ m ! ^[A-Z_a-z][0-9A-Z_a-z] *(?:::[0-9A-Z_a-z]+)*$ ! ;
463
- ($self -> {NAME_SYM } = $self -> {NAME }) =~ s /\W +/ _/ g ;
464
-
465
- for my $method (@init_methods ) { $self -> $method }
466
-
455
+ # CONFIGURE after PREREQ_FATAL so can rely on prereqs being present
456
+ my ($initial_att , $configure_att ) = $self -> extract_CONFIGURE;
467
457
$self -> arch_check(
468
458
$INC {' Config.pm' },
469
459
File::Spec-> catfile($Config {' archlibexp' }, " Config.pm" )
470
460
);
471
461
462
+ for my $method (@init_methods ) { $self -> $method }
472
463
$self -> makefile_preamble(\@ARGV , $initial_att , $configure_att );
473
464
$self -> generate_makefile;
474
465
0 commit comments