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