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