Revision history for Mouse
0.50_03
+ * Mouse::Object
+ - Fix a possible segv which is caused by destructors (gfx)
* Mouse::Util::TypeConstraints
- Implement the built-in type hierarchy (gfx)
my $bar = Bar->new;
}
-ok(
- $_,
- 'in_global_destruction state is passed to DEMOLISH properly (true)'
-) for split //, `$^X t/010_basics/020-global-destruction-helper.pl`;
+$? = 0;
+
+my $blib = $INC{'blib.pm'} ? ' -Mblib ' : '';
+my @status = `$^X $blib t/010_basics/020-global-destruction-helper.pl`;
+
+ok $status[0], 'in_global_destruction state is passed to DEMOLISH properly (true)';
+ok $status[1], 'in_global_destruction state is passed to DEMOLISH properly (true)';
+
+is $?, 0, 'exited successfully';
done_testing;
len = AvFILLp(demolishall) + 1;
if(len > 0){
GV* const statusvalue = gv_fetchpvs("?", 0, SVt_PV);
- SAVESPTR(GvSV(statusvalue)); /* local $? */
+
+ if(statusvalue){ /* it can be NULL */
+ SAVESPTR(GvSV(statusvalue)); /* local $? */
+ GvSV(statusvalue) = sv_newmortal();
+ }
SAVESPTR(ERRSV); /* local $@ */
+ ERRSV = newSVpvs_flags("", SVs_TEMP);
- GvSV(statusvalue) = sv_newmortal();
- ERRSV = newSVpvs_flags("", SVs_TEMP);
for(i = 0; i < len; i++){
SPAGAIN;