Debian Codegraph @

upstream/debian-unstable/man3/File::DosGlob.3perl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "File::DosGlob 3perl"
58 .TH File::DosGlob 3perl 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 File::DosGlob \- DOS like globbing and then some
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 .Vb 1
68 \& require 5.004;
69 \&
70 \& # override CORE::glob in current package
71 \& use File::DosGlob \*(Aqglob\*(Aq;
72 \&
73 \& # override CORE::glob in ALL packages (use with extreme caution!)
74 \& use File::DosGlob \*(AqGLOBAL_glob\*(Aq;
75 \&
76 \& @perlfiles = glob "..\e\epe?l/*.p?";
77 \& print <..\e\epe?l/*.p?>;
78 \&
79 \& # from the command line (overrides only in main::)
80 \& > perl \-MFile::DosGlob=glob \-e "print <../pe*/*p?>"
81 .Ve
82 .SH DESCRIPTION
83 .IX Header "DESCRIPTION"
84 A module that implements DOS-like globbing with a few enhancements.
85 It is largely compatible with perlglob.exe (the M$ setargv.obj
86 version) in all but one respect\-\-it understands wildcards in
87 directory components.
88 .PP
89 For example, \f(CW\*(C`<..\e\el*b\e\efile/*glob.p?>\*(C'\fR will work as expected (in
90 that it will find something like '..\elib\eFile/DosGlob.pm' alright).
91 Note that all path components are case-insensitive, and that
92 backslashes and forward slashes are both accepted, and preserved.
93 You may have to double the backslashes if you are putting them in
94 literally, due to double-quotish parsing of the pattern by perl.
95 .PP
96 Spaces in the argument delimit distinct patterns, so
97 \&\f(CW\*(C`glob(\*(Aq*.exe *.dll\*(Aq)\*(C'\fR globs all filenames that end in \f(CW\*(C`.exe\*(C'\fR
98 or \f(CW\*(C`.dll\*(C'\fR. If you want to put in literal spaces in the glob
99 pattern, you can escape them with either double quotes, or backslashes.
100 e.g. \f(CW\*(C`glob(\*(Aqc:/"Program Files"/*/*.dll\*(Aq)\*(C'\fR, or
101 \&\f(CW\*(C`glob(\*(Aqc:/Program\e Files/*/*.dll\*(Aq)\*(C'\fR. The argument is tokenized using
102 \&\f(CWText::ParseWords::parse_line()\fR, so see Text::ParseWords for details
103 of the quoting rules used.
104 .PP
105 Extending it to csh patterns is left as an exercise to the reader.
106 .SH "EXPORTS (by request only)"
107 .IX Header "EXPORTS (by request only)"
108 \&\fBglob()\fR
109 .SH BUGS
110 .IX Header "BUGS"
111 Should probably be built into the core, and needs to stop
112 pandering to DOS habits. Needs a dose of optimization too.
113 .SH AUTHOR
114 .IX Header "AUTHOR"
115 Gurusamy Sarathy <[email protected]>
116 .SH HISTORY
117 .IX Header "HISTORY"
118 .IP \(bu 4
119 Support for globally overriding \fBglob()\fR (GSAR 3\-JUN\-98)
120 .IP \(bu 4
121 Scalar context, independent iterator context fixes (GSAR 15\-SEP\-97)
122 .IP \(bu 4
123 A few dir-vs-file optimizations result in glob importation being
124 10 times faster than using perlglob.exe, and using perlglob.bat is
125 only twice as slow as perlglob.exe (GSAR 28\-MAY\-97)
126 .IP \(bu 4
127 Several cleanups prompted by lack of compatible perlglob.exe
128 under Borland (GSAR 27\-MAY\-97)
129 .IP \(bu 4
130 Initial version (GSAR 20\-FEB\-97)
131 .SH "SEE ALSO"
132 .IX Header "SEE ALSO"
133 perl
134 .PP
135 perlglob.bat
136 .PP
137 Text::ParseWords