6 # Test ${^GLOBAL_PHASE}
8 # Test::More, test.pl, etc assert plans in END, which happens before global
9 # destruction, so we don't want to use those here.
11 BEGIN { print "1..7\n" }
14 print "not " if !$_[0];
16 print " - $_[1]" if defined $_[1];
21 ok ${^GLOBAL_PHASE} eq 'START', 'START';
25 ok ${^GLOBAL_PHASE} eq 'CHECK', 'CHECK';
29 ok ${^GLOBAL_PHASE} eq 'INIT', 'INIT';
32 ok ${^GLOBAL_PHASE} eq 'RUN', 'RUN';
35 ok ${^GLOBAL_PHASE} eq 'RUN', 'DESTROY is run-time too, usually';
38 my $tiger = bless {}, Moo::;
41 ok ${^GLOBAL_PHASE} eq 'DESTRUCT', 'DESTRUCT';
44 our $affe = bless {}, Kooh::;
47 ok ${^GLOBAL_PHASE} eq 'END', 'END';