summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-04 01:49:24 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-04 01:49:24 +0000
commit95d94a4f85cab4045e157acc1a0d6b2096eecea2 (patch)
tree4c0d7da51c1602c22a20e58fd5c80ee25ecef428 /lib/File
parent5a0924038aa1098308ad491a6148bc59d3045ce6 (diff)
downloadperl-95d94a4f85cab4045e157acc1a0d6b2096eecea2.tar.gz
[win32] document CORE::GLOBAL:: and global overriding, fix up
File::DosGlob, testsuited and all p4raw-id: //depot/win32/perl@1072
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/DosGlob.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/File/DosGlob.pm b/lib/File/DosGlob.pm
index a27dad9030..24b28b2dce 100644
--- a/lib/File/DosGlob.pm
+++ b/lib/File/DosGlob.pm
@@ -130,10 +130,10 @@ sub glob {
sub import {
my $pkg = shift;
- my $callpkg = caller(0);
+ return unless @_;
my $sym = shift;
- *{$callpkg.'::'.$sym} = \&{$pkg.'::'.$sym}
- if defined($sym) and $sym eq 'glob';
+ my $callpkg = ($sym =~ s/^GLOBAL_// ? 'CORE::GLOBAL' : caller(0));
+ *{$callpkg.'::'.$sym} = \&{$pkg.'::'.$sym} if $sym eq 'glob';
}
1;
@@ -151,6 +151,9 @@ File::DosGlob - DOS like globbing and then some
# override CORE::glob in current package
use File::DosGlob 'glob';
+ # override CORE::glob in ALL packages (use with extreme caution!)
+ use File::DosGlob 'GLOBAL_glob';
+
@perlfiles = glob "..\\pe?l/*.p?";
print <..\\pe?l/*.p?>;
@@ -192,6 +195,10 @@ Gurusamy Sarathy <gsar@umich.edu>
=item *
+Support for globally overriding glob() (GSAR 3-JUN-98)
+
+=item *
+
Scalar context, independent iterator context fixes (GSAR 15-SEP-97)
=item *