diff options
Diffstat (limited to 'ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm')
-rw-r--r-- | ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm index 730c565d12..cede3180f8 100644 --- a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm +++ b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm @@ -8,7 +8,7 @@ use vars qw($VERSION @ISA @EXPORT); @ISA = qw(Exporter); @EXPORT = qw(writemain); -$VERSION = 1; +$VERSION = '1.01'; # blead will run this with miniperl, hence we can't use autodie or File::Temp my $temp; @@ -99,6 +99,8 @@ main(int argc, char **argv, char **env) #ifdef PERL_GLOBAL_STRUCT struct perl_vars *my_vars = init_global_struct(); # ifdef PERL_GLOBAL_STRUCT_PRIVATE + int veto; + my_plvarsp = my_vars; # endif #endif /* PERL_GLOBAL_STRUCT */ @@ -175,9 +177,13 @@ main(int argc, char **argv, char **env) PERL_SYS_TERM(); #ifdef PERL_GLOBAL_STRUCT +# ifdef PERL_GLOBAL_STRUCT_PRIVATE + veto = my_plvarsp->Gveto_cleanup; +# endif free_global_struct(my_vars); # ifdef PERL_GLOBAL_STRUCT_PRIVATE - my_plvarsp = NULL; + if (!veto) + my_plvarsp = NULL; /* Remember, functions registered with atexit() can run after this point, and may access "global" variables, and hence end up calling Perl_GetVarsPrivate() */ |