thinko in change#4546 that caused variables to lose their importedness
Gurusamy Sarathy [Sun, 5 Mar 2000 16:54:10 +0000 (16:54 +0000)]
(GvIMPORTED_XV_off should be !GvIMPORTED_XV)

p4raw-link: @4546 on //depot/perl: 11faa288e292c27cb2ddc4ccdc483b523d26ce19

p4raw-id: //depot/perl@5543

sv.c
t/pragma/strict-vars

diff --git a/sv.c b/sv.c
index f0fcfc0..8a86a92 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2611,7 +2611,7 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
                    else
                        dref = (SV*)GvAV(dstr);
                    GvAV(dstr) = (AV*)sref;
-                   if (GvIMPORTED_AV_off(dstr)
+                   if (!GvIMPORTED_AV(dstr)
                        && CopSTASH_ne(PL_curcop, GvSTASH(dstr)))
                    {
                        GvIMPORTED_AV_on(dstr);
@@ -2623,7 +2623,7 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
                    else
                        dref = (SV*)GvHV(dstr);
                    GvHV(dstr) = (HV*)sref;
-                   if (GvIMPORTED_HV_off(dstr)
+                   if (!GvIMPORTED_HV(dstr)
                        && CopSTASH_ne(PL_curcop, GvSTASH(dstr)))
                    {
                        GvIMPORTED_HV_on(dstr);
@@ -2674,7 +2674,7 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
                        GvASSUMECV_on(dstr);
                        PL_sub_generation++;
                    }
-                   if (GvIMPORTED_CV_off(dstr)
+                   if (!GvIMPORTED_CV(dstr)
                        && CopSTASH_ne(PL_curcop, GvSTASH(dstr)))
                    {
                        GvIMPORTED_CV_on(dstr);
@@ -2693,7 +2693,7 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
                    else
                        dref = (SV*)GvSV(dstr);
                    GvSV(dstr) = sref;
-                   if (GvIMPORTED_SV_off(dstr)
+                   if (!GvIMPORTED_SV(dstr)
                        && CopSTASH_ne(PL_curcop, GvSTASH(dstr)))
                    {
                        GvIMPORTED_SV_on(dstr);
index 9352c4b..954d1e5 100644 (file)
@@ -27,6 +27,15 @@ EXPECT
 # strict vars - no error
 use strict 'vars' ;
 use vars qw( $freddy) ;
+BEGIN { *freddy = \$joe::shmoe; }
+$freddy = 2 ;
+EXPECT
+
+########
+
+# strict vars - no error
+use strict 'vars' ;
+use vars qw( $freddy) ;
 local $abc::joe ;
 my $fred ;
 my $b = \$fred ;