summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-01-13 20:49:52 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-01-13 20:49:52 +0000
commitdfb634a9eac93365588858d3fa4687b4ce993eb7 (patch)
treeeabc0afebddd60be73c7c40cf1db9e9523ab4df5 /lib
parentd07c2202867c84a305417e42e522ca39d055c62a (diff)
downloadperl-dfb634a9eac93365588858d3fa4687b4ce993eb7.tar.gz
[win32] fix perlglob.bat warnings by splitting it from File::DosGlob
p4raw-id: //depot/win32/perl@417
Diffstat (limited to 'lib')
-rw-r--r--lib/File/DosGlob.pm35
1 files changed, 3 insertions, 32 deletions
diff --git a/lib/File/DosGlob.pm b/lib/File/DosGlob.pm
index 4597c71564..a27dad9030 100644
--- a/lib/File/DosGlob.pm
+++ b/lib/File/DosGlob.pm
@@ -6,21 +6,6 @@
package File::DosGlob;
-unless (caller) {
- $| = 1;
- while (@ARGV) {
- #
- # We have to do this one by one for compatibility reasons.
- # If an arg doesn't match anything, we are supposed to return
- # the original arg. I know, it stinks, eh?
- #
- my $arg = shift;
- my @m = doglob(1,$arg);
- print (@m ? join("\0", sort @m) : $arg);
- print "\0" if @ARGV;
- }
-}
-
sub doglob {
my $cond = shift;
my @retval = ();
@@ -159,8 +144,6 @@ __END__
File::DosGlob - DOS like globbing and then some
-perlglob.bat - a more capable perlglob.exe replacement
-
=head1 SYNOPSIS
require 5.004;
@@ -173,14 +156,11 @@ perlglob.bat - a more capable perlglob.exe replacement
# from the command line (overrides only in main::)
> perl -MFile::DosGlob=glob -e "print <../pe*/*p?>"
-
- > perlglob ../pe*/*p?
=head1 DESCRIPTION
A module that implements DOS-like globbing with a few enhancements.
-This file is also a portable replacement for perlglob.exe. It
-is largely compatible with perlglob.exe (the M$ setargv.obj
+It is largely compatible with perlglob.exe (the M$ setargv.obj
version) in all but one respect--it understands wildcards in
directory components.
@@ -191,17 +171,6 @@ backslashes and forward slashes are both accepted, and preserved.
You may have to double the backslashes if you are putting them in
literally, due to double-quotish parsing of the pattern by perl.
-When invoked as a program, it will print null-separated filenames
-to standard output.
-
-While one may replace perlglob.exe with this, usage by overriding
-CORE::glob via importation should be much more efficient, because
-it avoids launching a separate process, and is therefore strongly
-recommended. Note that it is currently possible to override
-builtins like glob() only on a per-package basis, not "globally".
-Thus, every namespace that wants to override glob() must explicitly
-request the override. See L<perlsub>.
-
Extending it to csh patterns is left as an exercise to the reader.
=head1 EXPORTS (by request only)
@@ -246,5 +215,7 @@ Initial version (GSAR 20-FEB-97)
perl
+perlglob.bat
+
=cut