6 # Test ${^GLOBAL_PHASE}
8 # Test::More, t/test.pl, etc., assert plans in END, which happens before global
9 # destruction. We do not want to use those programs/libraries here, so we
10 # place this file in directory t/opbasic.
12 BEGIN { print "1..7\n" }
15 print "not " if !$_[0];
17 print " - $_[1]" if defined $_[1];
22 ok ${^GLOBAL_PHASE} eq 'START', 'START';
26 ok ${^GLOBAL_PHASE} eq 'CHECK', 'CHECK';
30 ok ${^GLOBAL_PHASE} eq 'INIT', 'INIT';
33 ok ${^GLOBAL_PHASE} eq 'RUN', 'RUN';
36 ok ${^GLOBAL_PHASE} eq 'RUN', 'DESTROY is run-time too, usually';
39 my $tiger = bless {}, Moo::;
42 ok ${^GLOBAL_PHASE} eq 'DESTRUCT', 'DESTRUCT';
45 our $affe = bless {}, Kooh::;
48 ok ${^GLOBAL_PHASE} eq 'END', 'END';