summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2003-08-31 19:25:41 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-01 08:49:02 +0000
commitf444d49658e3e31ba2664f713eb9290d716237e9 (patch)
tree2e5899c0a4895e3f6993784f4b0e928e426bd124
parenteaf637cfe2d37262a1b3eba8b28b941eab0e25e7 (diff)
downloadperl-f444d49658e3e31ba2664f713eb9290d716237e9.tar.gz
glob() bug
Message-Id: <200309010925.h819Pf0X011457@smtp3.ActiveState.com> p4raw-id: //depot/perl@20980
-rw-r--r--op.c2
-rw-r--r--t/run/fresh_perl.t19
2 files changed, 18 insertions, 3 deletions
diff --git a/op.c b/op.c
index a4b20e7c15..d859e2aa62 100644
--- a/op.c
+++ b/op.c
@@ -5311,7 +5311,7 @@ Perl_ck_glob(pTHX_ OP *o)
#if !defined(PERL_EXTERNAL_GLOB)
/* XXX this can be tightened up and made more failsafe. */
- if (!gv) {
+ if (!(gv && GvCVu(gv) && GvIMPORTED_CV(gv))) {
GV *glob_gv;
ENTER;
Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT,
diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t
index 1fd44174a1..081c38663e 100644
--- a/t/run/fresh_perl.t
+++ b/t/run/fresh_perl.t
@@ -822,5 +822,20 @@ It's good! >A< >B<
$_="foo";utf8::upgrade($_);/bar/i,warn$_;
EXPECT
foo at - line 1.
-
-
+######## glob() bug Mon, 01 Sep 2003 02:25:41 -0700 <200309010925.h819Pf0X011457@smtp3.ActiveState.com>
+-lw
+print glob(q(./"TEST"));
+use File::Glob;
+print glob(q(./"TEST"));
+EXPECT
+./"TEST"
+./"TEST"
+######## glob() bug Mon, 01 Sep 2003 02:25:41 -0700 <200309010925.h819Pf0X011457@smtp3.ActiveState.com>
+-lw
+use File::Glob;
+print glob(q(./"TEST"));
+use File::Glob;
+print glob(q(./"TEST"));
+EXPECT
+./"TEST"
+./"TEST"