Add fallback to tmpfile for use in cases where user's relying on
[p5sagit/p5-mst-13.2.git] / Porting / findvars
1 #!/l/local/bin/perl -w
2
3 $pat = '';
4 # construct word list
5 while (<DATA>) {
6   chomp;
7   next unless $_;
8   $pat .= "$_|";
9 }
10 chop $pat if $pat =~ /\|$/;
11
12 # grep
13 while (<>) {
14     print "$ARGV\:$.\:$_" if s/\b($pat)\b/#$1#/og;
15 # this variant might useful if the transformation is more complicated
16 #    if (/^(.*?)\b($pat)\b(.*)$/o) {
17 #        my $head = "$1#$2#";
18 #        $_ = $3;
19 #        while (/^(.*?)\b($pat)\b(.*)$/o) {
20 #            $head .= "$1#$2#";
21 #            $_ = $3;
22 #        }
23 #       print "$ARGV\:$.\:$head$_\n";
24 #    }
25 }
26 continue {
27     close ARGV if eof;
28 }
29 __END__
30 Argv
31 Cmd
32 DBcv
33 DBgv
34 DBline
35 DBsignal
36 DBsingle
37 DBsub
38 DBtrace
39 No
40 Sv
41 Xpv
42 Yes
43 amagic_generation
44 ampergv
45 an
46 archpat_auto
47 argvgv
48 argvoutgv
49 av_fetch_sv
50 basetime
51 beginav
52 bodytarget
53 bostr
54 bufend
55 bufptr
56 cddir
57 chopset
58 collation_ix
59 collation_name
60 collation_standard
61 collxfrm_base
62 collxfrm_mult
63 colors
64 colorset
65 compcv
66 compiling
67 comppad
68 comppad_name
69 comppad_name_fill
70 comppad_name_floor
71 cop_seqmax
72 copline
73 cryptseen
74 cshlen
75 cshname
76 curcop
77 curcopdb
78 curinterp
79 curpad
80 curpm
81 curstack
82 curstackinfo
83 curstash
84 curstname
85 curthr
86 dbargs
87 debdelim
88 debname
89 debstash
90 debug
91 defgv
92 defoutgv
93 defstash
94 delaymagic
95 diehook
96 dirty
97 dlevel
98 dlmax
99 do_undump
100 doextract
101 doswitches
102 dowarn
103 dumplvl
104 e_script
105 egid
106 endav
107 envgv
108 errgv
109 error_count
110 euid
111 eval_cond
112 eval_mutex
113 eval_owner
114 eval_root
115 eval_start
116 evalseq
117 exitlist
118 exitlistlen
119 expect
120 extralen
121 fdpid
122 filemode
123 firstgv
124 forkprocess
125 formfeed
126 formtarget
127 generation
128 gensym
129 gid
130 globalstash
131 he_root
132 hexdigit
133 hintgv
134 hints
135 hv_fetch_ent_mh
136 hv_fetch_sv
137 in_clean_all
138 in_clean_objs
139 in_eval
140 in_my
141 in_my_stash
142 incgv
143 initav
144 inplace
145 last_in_gv
146 last_lop
147 last_lop_op
148 last_proto
149 last_uni
150 lastfd
151 lastgotoprobe
152 lastscream
153 lastsize
154 lastspbase
155 laststatval
156 laststype
157 leftgv
158 lex_brackets
159 lex_brackstack
160 lex_casemods
161 lex_casestack
162 lex_defer
163 lex_dojoin
164 lex_expect
165 lex_fakebrack
166 lex_formbrack
167 lex_inpat
168 lex_inwhat
169 lex_op
170 lex_repl
171 lex_starts
172 lex_state
173 lex_stuff
174 lineary
175 linestart
176 linestr
177 localizing
178 localpatches
179 main_cv
180 main_root
181 main_start
182 mainstack
183 malloc_mutex
184 markstack
185 markstack_max
186 markstack_ptr
187 max_intro_pending
188 maxo
189 maxscream
190 maxsysfd
191 mess_sv
192 min_intro_pending
193 minus_F
194 minus_a
195 minus_c
196 minus_l
197 minus_n
198 minus_p
199 modcount
200 modglobal
201 multi_close
202 multi_end
203 multi_open
204 multi_start
205 multiline
206 mystrk
207 na
208 nexttoke
209 nexttype
210 nextval
211 nice_chunk
212 nice_chunk_size
213 ninterps
214 nomemok
215 nrs
216 nthreads
217 nthreads_cond
218 numeric_local
219 numeric_name
220 numeric_standard
221 ofmt
222 ofs
223 ofslen
224 oldbufptr
225 oldlastpm
226 oldname
227 oldoldbufptr
228 op
229 op_mask
230 op_seqmax
231 opsave
232 origalen
233 origargc
234 origargv
235 origenviron
236 origfilename
237 ors
238 orslen
239 osname
240 pad_reset_pending
241 padix
242 padix_floor
243 patchlevel
244 patleave
245 pending_ident
246 perl_destruct_level
247 perldb
248 pidstatus
249 preambleav
250 preambled
251 preprocess
252 profiledata
253 reg_eval_set
254 reg_flags
255 reg_start_tmp
256 reg_start_tmpl
257 regbol
258 regcc
259 regcode
260 regcomp_parse
261 regcomp_rx
262 regcompp
263 regdata
264 regdummy
265 regendp
266 regeol
267 regexecp
268 regflags
269 regindent
270 reginput
271 reginterp_cnt
272 reglastparen
273 regnarrate
274 regnaughty
275 regnpar
276 regprecomp
277 regprev
278 regprogram
279 regsawback
280 regseen
281 regsize
282 regstartp
283 regtill
284 regxend
285 replgv
286 restartop
287 retstack
288 retstack_ix
289 retstack_max
290 rightgv
291 rs
292 rsfp
293 rsfp_filters
294 runops
295 savestack
296 savestack_ix
297 savestack_max
298 sawampersand
299 sawstudy
300 sawvec
301 scopestack
302 scopestack_ix
303 scopestack_max
304 screamfirst
305 screamnext
306 secondgv
307 seen_evals
308 seen_zerolen
309 sh_path
310 siggv
311 sighandlerp
312 sortcop
313 sortcxix
314 sortstash
315 specialsv_list
316 splitstr
317 stack_base
318 stack_max
319 stack_sp
320 start_env
321 statbuf
322 statcache
323 statgv
324 statname
325 statusvalue
326 statusvalue_vms
327 stdingv
328 strchop
329 strtab
330 sub_generation
331 sublex_info
332 subline
333 subname
334 sv_arenaroot
335 sv_count
336 sv_mutex
337 sv_no
338 sv_objcount
339 sv_root
340 sv_undef
341 sv_yes
342 svref_mutex
343 sys_intern
344 tainted
345 tainting
346 thisexpr
347 thr_key
348 threadnum
349 threads_mutex
350 threadsv_names
351 thrsv
352 timesbuf
353 tmps_floor
354 tmps_ix
355 tmps_max
356 tmps_stack
357 tokenbuf
358 top_env
359 toptarget
360 uid
361 unsafe
362 warnhook
363 xiv_arenaroot
364 xiv_root
365 xnv_root
366 xpv_root
367 xrv_root
368 piMem
369 piENV
370 piStdIO
371 piLIO
372 piDir
373 piSock
374 piProc