lib/B/Keywords.pm

filter: Statementstmt 100% 61 / 61 Branchbran 48.3% 29 / 60 Conditioncond 31.2% 15 / 48 MC/DCmcdc 0.0% 0 / 26 Subroutinesub 100% 15 / 15 Podpod n/a totaltotal 57.1% 120 / 210 CC 1 SCAR 0.0
CC
1
Cov
62%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/B/Keywords.pm ↑ Summary
1 ## no critic (PodSections,UseWarnings,Interpolation,EndWithOne,NoisyQuotes)
2  
3 package B::Keywords;
4  
5 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 require Exporter;
8 3 *import = *import = \&Exporter::import;
9  
10 3 ▶use vars qw( @EXPORT_OK %EXPORT_TAGS );
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 @EXPORT_OK = qw( @Scalars @Arrays @Hashes @Filehandles @Symbols
12 @Functions @Barewords @TieIOMethods @UNIVERSALMethods
13 @ExporterSymbols );
14 3 %EXPORT_TAGS = ( 'all' => \@EXPORT_OK );
15  
16 3 ▶use vars '$VERSION';
Subroutine BEGIN: called CC=1 SCAR=0.0
17 3 $VERSION = '1.24';
18 3 ▶my $CPERL = $^V =~ /c$/ ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$^V =~ /c$/ ? : 0 3 3
19  
20 3 ▶use vars '@Scalars';
Subroutine BEGIN: called CC=1 SCAR=0.0
21 3 ▶@Scalars = (
Branch: 1 branch
BranchTrueFalseTotal
$] < 5.008001 ? : 0 3 3
22 qw( $a
23 $b
24 $_ $ARG
25 $& $MATCH
26 $` $PREMATCH
27 $' $POSTMATCH
28 $+ $LAST_PAREN_MATCH ),
29 ($] < 5.008001 ?
30 qw( $* $MULTILINE_MATCHING) : ()),
31 qw( $. $INPUT_LINE_NUMBER $NR
32 $/ $INPUT_RECORD_SEPARATOR $RS
33 $| $OUTPUT_AUTOFLUSH ), '$,', qw( $OUTPUT_FIELD_SEPARATOR $OFS
34 $\ $OUTPUT_RECORD_SEPARATOR $ORS
35 $" $LIST_SEPARATOR
36 $; $SUBSCRIPT_SEPARATOR $SUBSEP
37 ), '$#', qw( $OFMT
38 $% $FORMAT_PAGE_NUMBER
39 $= $FORMAT_LINES_PER_PAGE
40 $- $FORMAT_LINES_LEFT
41 $~ $FORMAT_NAME
42 $^ $FORMAT_TOP_NAME
43 $: $FORMAT_LINE_BREAK_CHARACTERS
44 $? $CHILD_ERROR $^CHILD_ERROR_NATIVE
45 $! $ERRNO $OS_ERROR
46 $@ $EVAL_ERROR
47 $$ $PROCESS_ID $PID
48 $< $REAL_USER_ID $UID
49 $> $EFFECTIVE_USER_ID $EUID ),
50 '$(', qw( $REAL_GROUP_ID $GID ),
51 '$)', qw( $EFFECTIVE_GROUP_ID $EGID
52 $0 $PROGRAM_NAME
53 $[
54 $]
55 $^A $ACCUMULATOR
56 $^C $COMPILING
57 $^CHILD_ERROR_NATIVE
58 $^D $DEBUGGING
59 $^E $EXTENDED_OS_ERROR
60 $^ENCODING
61 $^F $SYSTEM_FD_MAX
62 $^GLOBAL_PHASE
63 $^H
64 $^I $INPLACE_EDIT
65 $^L $FORMAT_FORMFEED
66 $^LAST_FH
67 $^M
68 $^MATCH
69 $^N $LAST_SUBMATCH_RESULT
70 $^O $OSNAME
71 $^OPEN
72 $^P $PERLDB
73 $^PREMATCH $^POSTMATCH
74 $^R $LAST_REGEXP_CODE_RESULT
75 $^RE_DEBUG_FLAGS
76 $^RE_TRIE_MAXBUF
77 $^S $EXCEPTIONS_BEING_CAUGHT
78 $^T $BASETIME
79 $^TAINT
80 $^UNICODE
81 $^UTF8CACHE
82 $^UTF8LOCALE
83 $^V $PERL_VERSION
84 $^W $WARNING $^WARNING_BITS
85 $^WIDE_SYSTEM_CALLS
86 $^WIN32_SLOPPY_STAT
87 $^X $EXECUTABLE_NAME
88 $ARGV
89 ),
90 );
91  
92 3 ▶use vars '@Arrays';
Subroutine BEGIN: called CC=1 SCAR=0.0
93 3 @Arrays = qw(
94 @+ $LAST_MATCH_END
95 @- @LAST_MATCH_START
96 @ARGV
97 @F
98 @INC
99 @_ @ARG
100 );
101  
102 3 ▶use vars '@Hashes';
Subroutine BEGIN: called CC=1 SCAR=0.0
103 3 @Hashes = qw(
104 %main
105 %CORE
106 %CORE::GLOBAL::
107 %OVERLOAD
108 %+ %LAST_MATCH_END
109 %- %LAST_MATCH_START
110 %! %OS_ERROR %ERRNO
111 %^H
112 %INC
113 %ENV
114 %SIG
115 );
116  
117 3 ▶use vars '@Filehandles';
Subroutine BEGIN: called CC=1 SCAR=0.0
118 3 @Filehandles = qw(
119 *ARGV ARGV
120 *_ _
121 ARGVOUT
122 DATA
123 STDIN
124 STDOUT
125 STDERR
126 );
127  
128 3 ▶use vars '@Functions';
Subroutine BEGIN: called CC=1 SCAR=0.0
129 3 ▶@Functions = (
Branch: 17 branches
BranchTrueFalseTotal
$] >= 5.015006 ? : 3 0 3
$] >= 5.005064 && $] < 5.006 ? : 0 3 3
$] >= 5.006 ? : 3 0 3
$] < 5.007003 ? : 0 3 3
$] >= 5.009005 ? : 3 0 3
$] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008 || $CPERL) ? : 3 0 3
$] >= 5.009003 && ($] < 5.027007 || $CPERL) ? : 0 3 3
$] >= 5.015005 ? : 3 0 3
$] >= 5.029 && $CPERL ? : 0 3 3
$] >= 5.015008 ? : 3 0 3
$] >= 5.009003 ? : 3 0 3
$] >= 5.031007 ? : 3 0 3
$] >= 5.004 ? : 3 0 3
$] >= 5.005061 ? : 3 0 3
$] >= 5.009003 ? : 3 0 3
$] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008 || $CPERL) ? : 3 0 3
$] >= 5.009003 && !$CPERL ? : 0 0 0
Condition30%10/33
$] >= "5.005064" and $] < "5.006"
!ll&&!rl&&r
030
$] >= "5.009003" and $] < "5.027007" || $] >= "5.027008" || $CPERL
!ll&&!rl&&r
003
$] < "5.027007" or $] >= "5.027008" or $CPERL
l!l&&r!l&&!r
300
$] < "5.027007" or $] >= "5.027008"
l!l&&r!l&&!r
030
$] >= "5.009003" and $] < "5.027007" || $CPERL
!ll&&!rl&&r
030
$] < "5.027007" or $CPERL
l!l&&r!l&&!r
003
$] >= "5.029" and $CPERL
!ll&&!rl&&r
030
$] >= "5.009003" and $] < "5.027007" || $] >= "5.027008" || $CPERL
!ll&&!rl&&r
003
$] < "5.027007" or $] >= "5.027008" or $CPERL
l!l&&r!l&&!r
300
$] < "5.027007" or $] >= "5.027008"
l!l&&r!l&&!r
030
$] >= "5.009003" and not $CPERL
!ll&&!rl&&r
000
MC/DC0%0/2
$] >= "5.005064" and $] < "5.006"
$] >= "5.005064" $] < "5.006"
MC/DC0%0/4
$] >= "5.009003" and $] < "5.027007" || $] >= "5.027008" || $CPERL
$] >= "5.009003" $] < "5.027007" $] >= "5.027008" $CPERL
MC/DC0%0/3
$] >= "5.009003" and $] < "5.027007" || $CPERL
$] >= "5.009003" $] < "5.027007" $CPERL
MC/DC0%0/2
$] >= "5.029" and $CPERL
$] >= "5.029" $CPERL
MC/DC0%0/4
$] >= "5.009003" and $] < "5.027007" || $] >= "5.027008" || $CPERL
$] >= "5.009003" $] < "5.027007" $] >= "5.027008" $CPERL
MC/DC0%0/2
$] >= "5.009003" and not $CPERL
$] >= "5.009003" not $CPERL
Truth table33%1/3
A and B
A= $] >= "5.005064"B= $] < "5.006"
ABresult
0X0
100
111
Truth table0%0/5
A and B or C or D
A= $] >= "5.009003"B= $] < "5.027007"C= $] >= "5.027008"D= $CPERL
ABCDresult
0XXX0
10000
11XX1
101X1
10011
Truth table0%0/4
A and B or C
A= $] >= "5.009003"B= $] < "5.027007"C= $CPERL
ABCresult
0XX0
1000
11X1
1011
Truth table33%1/3
A and B
A= $] >= "5.029"B= $CPERL
ABresult
0X0
100
111
Truth table0%0/5
A and B or C or D
A= $] >= "5.009003"B= $] < "5.027007"C= $] >= "5.027008"D= $CPERL
ABCDresult
0XXX0
10000
11XX1
101X1
10011
Truth table0%0/3
A and not(B)
A= $] >= "5.009003"B= not $CPERL
ABresult
0X0
100
111
130 ($] >= 5.015006 ? qw(
131 __SUB__
132 ) : ()), qw(
133 AUTOLOAD
134 BEGIN
135 DESTROY
136 END ),
137 # STOP was between 5.5.64 - 5.6.0
138 ($] >= 5.005064 && $] < 5.006
139 ? qw(STOP) : qw(CHECK)),
140 # INIT was called RESTART before 5.004_50
141 ($] >= 5.006
142 ? qw(INIT) : qw(RESTART)),
143 # removed with 855a8c432447
144 ($] < 5.007003 ? qw(
145 EQ GE GT LE LT NE
146 ) : ()),
147 ($] >= 5.009005 ? qw(
148 UNITCHECK
149 ) : ()), qw(
150 abs
151 accept
152 alarm
153 atan2
154 bind
155 binmode
156 bless ),
157 ($] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008 || $CPERL) ? qw(
158 break
159 ) : ()), qw(
160 caller
161 chdir
162 chmod
163 chomp
164 chop
165 chown
166 chr
167 chroot
168 close
169 closedir
170 connect
171 cos
172 crypt
173 dbmclose
174 dbmopen ),
175 ($] >= 5.009003 && ($] < 5.027007 || $CPERL) ? qw(
176 default
177 ) : ()), qw(
178 defined
179 delete
180 die
181 dump
182 each
183 endgrent
184 endhostent
185 endnetent
186 endprotoent
187 endpwent
188 endservent
189 eof
190 eval ),
191 ($] >= 5.015005 ? qw(
192 evalbytes
193 ) : ()), qw(
194 exec
195 exists
196 exit
197 exp ),
198 ($] >= 5.029 && $CPERL ? qw(
199 extern
200 ) : ()),
201 ($] >= 5.015008 ? qw(
202 fc
203 ) : ()), qw(
204 fcntl
205 fileno
206 flock
207 fork
208 format
209 formline
210 getc
211 getgrent
212 getgrgid
213 getgrnam
214 gethostbyaddr
215 gethostbyname
216 gethostent
217 getlogin
218 getnetbyaddr
219 getnetbyname
220 getnetent
221 getpeername
222 getpgrp
223 getppid
224 getpriority
225 getprotobyname
226 getprotobynumber
227 getprotoent
228 getpwent
229 getpwnam
230 getpwuid
231 getservbyname
232 getservbyport
233 getservent
234 getsockname
235 getsockopt ),
236 ($] >= 5.009003 ? qw(
237 given
238 ) : ()), qw(
239 glob
240 gmtime
241 goto
242 grep
243 hex
244 index
245 int
246 ioctl ),
247 ($] >= 5.031007 ? qw(
248 isa
249 ) : ()), qw(
250 join
251 keys
252 kill
253 last
254 lc
255 lcfirst
256 length
257 link
258 listen
259 local
260 localtime ),
261 ($] >= 5.004 ? qw(
262 lock
263 ) : ()), qw(
264 log
265 lstat
266 map
267 mkdir
268 msgctl
269 msgget
270 msgrcv
271 msgsnd
272 my
273 next
274 not
275 oct
276 open
277 opendir
278 ord ),
279 ($] >= 5.005061 ? qw(
280 our
281 ) : ()), qw(
282 pack
283 pipe
284 pop
285 pos
286 print
287 printf
288 prototype
289 push
290 quotemeta
291 rand
292 read
293 readdir
294 readline
295 readlink
296 readpipe
297 recv
298 redo
299 ref
300 rename
301 require
302 reset
303 return
304 reverse
305 rewinddir
306 rindex
307 rmdir ),
308 ($] >= 5.009003 ? qw(
309 say
310 ) : ()), qw(
311 scalar
312 seek
313 seekdir
314 select
315 semctl
316 semget
317 semop
318 send
319 setgrent
320 sethostent
321 setnetent
322 setpgrp
323 setpriority
324 setprotoent
325 setpwent
326 setservent
327 setsockopt
328 shift
329 shmctl
330 shmget
331 shmread
332 shmwrite
333 shutdown
334 sin
335 sleep
336 socket
337 socketpair
338 sort
339 splice
340 split
341 sprintf
342 sqrt
343 srand
344 stat
345 study
346 substr
347 symlink
348 syscall
349 sysopen
350 sysread
351 sysseek
352 system
353 syswrite
354 tell
355 telldir
356 tie
357 tied
358 time
359 times
360 truncate
361 uc
362 ucfirst
363 umask
364 undef
365 unlink
366 unpack
367 unshift
368 untie
369 use
370 utime
371 values
372 vec
373 wait
374 waitpid
375 wantarray
376 warn ),
377 ($] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008 || $CPERL) ? qw(
378 when
379 ) : ($] >= 5.009003 && !$CPERL) ? qw(
380 whereis
381 whereso
382 ) : ()), qw(
383 write
384  
385 -r -w -x -o
386 -R -W -X -O -e -z -s
387 -f -d -l -p -S -b -c -t
388 -u -g -k
389 -T -B
390 -M -A -C
391 ));
392  
393 3 ▶use vars '@Barewords';
Subroutine BEGIN: called CC=1 SCAR=0.0
394 3 ▶@Barewords = (
Branch: 11 branches
BranchTrueFalseTotal
$] >= 5.0 && $] < 5.01901 ? : 0 3 3
$CPERL && $] >= 5.027001 ? : 0 3 3
$] >= 5.008001 && $] < 5.01 ? : 0 3 3
$] >= 5.004072 ? : 3 0 3
$] == 5.007003 ? : 0 3 3
$] >= 5.009003 ? : 3 0 3
$] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008) ? : 3 0 3
$] >= 5.009004 ? : 3 0 3
$] >= 5.033007 ? : 3 0 3
$] >= 5.035004 ? : 3 0 3
$] >= 5.035008 ? : 3 0 3
Condition33%5/15
$] >= 5 and $] < "5.01901"
!ll&&!rl&&r
030
$CPERL and $] >= "5.027001"
!ll&&!rl&&r
300
$] >= "5.008001" and $] < "5.01"
!ll&&!rl&&r
030
$] >= "5.009003" and $] < "5.027007" || $] >= "5.027008"
!ll&&!rl&&r
003
$] < "5.027007" or $] >= "5.027008"
l!l&&r!l&&!r
030
MC/DC0%0/2
$] >= 5 and $] < "5.01901"
$] >= 5 $] < "5.01901"
MC/DC0%0/2
$CPERL and $] >= "5.027001"
$CPERL $] >= "5.027001"
MC/DC0%0/2
$] >= "5.008001" and $] < "5.01"
$] >= "5.008001" $] < "5.01"
MC/DC0%0/3
$] >= "5.009003" and $] < "5.027007" || $] >= "5.027008"
$] >= "5.009003" $] < "5.027007" $] >= "5.027008"
Truth table33%1/3
A and B
A= $] >= 5B= $] < "5.01901"
ABresult
0X0
100
111
Truth table33%1/3
A and B
A= $CPERLB= $] >= "5.027001"
ABresult
0X0
100
111
Truth table33%1/3
A and B
A= $] >= "5.008001"B= $] < "5.01"
ABresult
0X0
100
111
Truth table0%0/4
A and B or C
A= $] >= "5.009003"B= $] < "5.027007"C= $] >= "5.027008"
ABCresult
0XX0
1000
11X1
1011
395 qw(
396 __FILE__
397 __LINE__
398 __PACKAGE__
399 __DATA__
400 __END__
401 NULL
402 and ),
403 #removed with a96df643850d22bc4a94
404 ($] >= 5.000 && $] < 5.019010 ? qw(
405 CORE
406 ) : ()),
407 ($CPERL && $] >= 5.027001 ? qw(
408 class method role multi has
409 ) : ()), qw(
410 cmp
411 continue
412 do
413 else
414 elsif
415 eq ),
416 # added with dor (c963b151157d), removed with f23102e2d6356
417 # in fact this was never in keywords.h for some reason
418 ($] >= 5.008001 && $] < 5.010 ? qw(
419 err
420 ) : ()),
421 qw(
422 for
423 foreach
424 ge
425 gt
426 if
427 le
428 lock
429 lt
430 m
431 ne
432 no
433 or
434 package
435 q
436 qq ),
437 ($] >= 5.004072 ? qw(
438 qr
439 ) : ()),
440 ($] == 5.007003 ? qw(
441 qu
442 ) : ()), qw(
443 qw
444 qx
445 s
446 sub
447 tr
448 unless
449 until
450 while
451 x
452 xor
453 y
454 ),
455 # also with default, say
456 ($] >= 5.009003 ? qw(
457 break
458 given
459 when
460 ) : ()
461 ),
462 # removed as useless with 5.27.7, re-added with 7896dde7482a2851
463 ($] >= 5.009003 && ($] < 5.027007 || $] >= 5.027008) ? qw(
464 default
465 ) : ()
466 ),
467 ($] >= 5.009004 ? qw(
468 state
469 ) : ()
470 ),
471 ($] >= 5.033007 ? qw(
472 try
473 catch
474 ) : ()
475 ),
476 ($] >= 5.035004 ? qw(
477 defer
478 ) : ()
479 ),
480 ($] >= 5.035008 ? qw(
481 finally
482 ) : ()
483 ),
484 );
485  
486 # Extra barewords not in keywords.h (import was never in keywords)
487 3 ▶use vars '@BarewordsExtra';
Subroutine BEGIN: called CC=1 SCAR=0.0
488 3 @BarewordsExtra = qw(
489 import
490 unimport
491 );
492  
493 3 ▶use vars '@TieIOMethods';
Subroutine BEGIN: called CC=1 SCAR=0.0
494 3 @TieIOMethods = qw(
495 BINMODE CLEAR CLEARERR CLONE CLONE_SKIP CLOSE DELETE EOF
496 ERROR EXISTS EXTEND FDOPEN FETCH FETCHSIZE FILENO FILL FIRSTKEY FLUSH
497 GETC NEXTKEY OPEN POP POPPED PRINT PRINTF PUSH PUSHED READ READLINE
498 SCALAR SEEK SETLINEBUF SHIFT SPLICE STORE STORESIZE SYSOPEN TELL
499 TIEARRAY TIEHANDLE TIEHASH TIESCALAR UNREAD UNSHIFT UNTIE UTF8 WRITE
500 );
501  
502 3 ▶use vars '@UNIVERSALMethods';
Subroutine BEGIN: called CC=1 SCAR=0.0
503 3 @UNIVERSALMethods = qw(
504 can isa DOES VERSION
505 );
506  
507 3 ▶use vars '@ExporterSymbols';
Subroutine BEGIN: called CC=1 SCAR=0.0
508 3 @ExporterSymbols = qw(
509 @EXPORT @EXPORT_OK @EXPORT_FAIL
510 @EXPORT_TAGS _push_tags _rebuild_cache as_heavy export export_fail
511 export_fail_in export_ok_tags export_tags export_to_level heavy_export
512 heavy_export_ok_tags heavy_export_tags heavy_export_to_level
513 heavy_require_version require_version
514 );
515  
516 3 ▶use vars '@Symbols';
Subroutine BEGIN: called CC=1 SCAR=0.0
517 3 @Symbols = ( @Scalars, @Arrays, @Hashes, @Filehandles, @Functions );
518  
519 # This quote is blatantly copied from ErrantStory.com, Michael Poe's
520 # comic.
521 3 ▶BEGIN { $^W = 0 }
Subroutine BEGIN: called CC=1 SCAR=0.0
522 3 "You know, when you stop and think about it, Cthulhu is a bit a Mary Sue isn't he?"
523  
524 __END__
« blib/lib/B/Keywords.pm ↑ Summary