In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/79bffe477e0016f596b86950244ad3a10a753e58?hp=45f11e9ca40e7c288751ad2b4f3922e3fd05c0f7>

- Log -----------------------------------------------------------------
commit 79bffe477e0016f596b86950244ad3a10a753e58
Author: Father Chrysostomos <[email protected]>
Date:   Mon Sep 17 21:44:29 2012 -0700

    Handle xhv_super in thread cloning

M       sv.c

commit 5512f27187761a7d316f00f01f7c97b23c9d3f08
Author: Father Chrysostomos <[email protected]>
Date:   Sun Sep 16 07:20:45 2012 -0700

    t/run/mad.t: Avoid %ENV assignment
    
    I see no skip on VMS, so use an %ENV localisation that it supports.

M       t/run/mad.t

commit 53cf29abd51a29b2de6000dd437ff6ce6e638a50
Author: Father Chrysostomos <[email protected]>
Date:   Sun Sep 16 07:13:41 2012 -0700

    g++ + mad fails t/run/mad.t
    
    For some reason, g++ causes $^X to have a relative path when called
    with one, whereas gcc causes it to have an absolute path:
    
    g++:
    
    $ ./perl -le 'print $^X'
    ./perl
    
    gcc:
    
    $ ./perl -le 'print $^X'
    /Users/sprout/Perl/perl.git-copy/perl
    
    (This is on 32-bit darwin.)
    
    This affects mad.t’s ability to find the current perl interpreter
    after a chdir.

M       t/run/mad.t
-----------------------------------------------------------------------

Summary of changes:
 sv.c        |    1 +
 t/run/mad.t |   16 ++++++++--------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/sv.c b/sv.c
index 2312a36..89699be 100644
--- a/sv.c
+++ b/sv.c
@@ -12129,6 +12129,7 @@ S_sv_dup_common(pTHX_ const SV *const sstr, 
CLONE_PARAMS *const param)
                         daux->xhv_mro_meta = saux->xhv_mro_meta
                             ? mro_meta_dup(saux->xhv_mro_meta, param)
                             : 0;
+                       daux->xhv_super = NULL;
 
                        /* Record stashes for possible cloning in Perl_clone(). 
*/
                        if (HvNAME(sstr))
diff --git a/t/run/mad.t b/t/run/mad.t
index 3c78df8..83023c5 100644
--- a/t/run/mad.t
+++ b/t/run/mad.t
@@ -13,17 +13,16 @@ BEGIN {
 }
 
 use File::Path;
+use File::Spec;
 
 my $tempdir = tempfile;
 
 mkdir $tempdir, 0700 or die "Can't mkdir '$tempdir': $!";
-chdir $tempdir or die die "Can't chdir '$tempdir': $!";
 unshift @INC, '../../lib';
 my $cleanup = 1;
 
 END {
     if ($cleanup) {
-       chdir '..' or die "Couldn't chdir .. for cleanup: $!";
        rmtree($tempdir);
     }
 }
@@ -31,16 +30,17 @@ END {
 plan tests => 4;
 
 {
-    local %ENV = %ENV;
-    $ENV{PERL_XMLDUMP} = "withoutT.xml";
+    delete local $ENV{$_} for keys %ENV;
+    my $fn = File::Spec->catfile(File::Spec->curdir(), "withoutT.xml");
+    $ENV{PERL_XMLDUMP} = $fn;
     fresh_perl_is('print q/hello/', '', {}, 'mad without -T');
-    ok(-f "withoutT.xml", "xml file created without -T as expected");
+    ok(-f $fn, "xml file created without -T as expected");
 }
 
 {
-    local %ENV = %ENV;
-    $ENV{PERL_XMLDUMP} = "withT.xml";
+    delete local $ENV{$_} for keys %ENV;
+    my $fn = File::Spec->catfile(File::Spec->curdir(), "withT.xml");
     fresh_perl_is('print q/hello/', 'hello', { switches => [ "-T" ] },
                  'mad with -T');
-    ok(!-e "withT.xml", "no xml file created with -T as expected");
+    ok(!-e $fn, "no xml file created with -T as expected");
 }

--
Perl5 Master Repository

Reply via email to