Branch Coverage

stolen_chunk_of_toke.c
Criterion Covered Total %
branch 97 606 16.0


line true false branch
233 0 0 if (!PL_rsfp_filters)
235 0 0 if (idx > AvFILLp(PL_rsfp_filters)) { /* Any more filters? */
240 0 0 if (maxlen) {
246 0 0 SvGROW(buf_sv, (STRLEN)(old_len + maxlen)) ;
0 0 SvGROW(buf_sv, (STRLEN)(old_len + maxlen)) ;
247 0 0 if ((len = PerlIO_read(PL_rsfp, SvPVX(buf_sv) + old_len, maxlen)) <= 0){
248 0 0 if (PerlIO_error(PL_rsfp))
256 0 0 if (sv_gets(buf_sv, PL_rsfp, SvCUR(buf_sv)) == NULL) {
257 0 0 if (PerlIO_error(PL_rsfp))
266 0 0 if ( (datasv = FILTER_DATA(idx)) == &PL_sv_undef) {
0 0 if ( (datasv = FILTER_DATA(idx)) == &PL_sv_undef) {
291 32 0 if (PL_rsfp_filters) {
292 20 12 if (!append)
294 32 0 if (FILTER_READ(0, sv, 0) > 0)
312 0 506 if (PL_lex_formbrack && PL_lex_brackets <= PL_lex_formbrack) {
0 0 if (PL_lex_formbrack && PL_lex_brackets <= PL_lex_formbrack) {
313 0 0 while (s < PL_bufend && SPACE_OR_TAB(*s))
0 0 while (s < PL_bufend && SPACE_OR_TAB(*s))
0 0 while (s < PL_bufend && SPACE_OR_TAB(*s))
321 933 13 while (s < PL_bufend && isSPACE(*s)) {
428 505 while (s < PL_bufend && isSPACE(*s)) {
322 6 422 if (*s++ == '\n' && ((incline == 2) || (PL_in_eval && !PL_rsfp && !incline)))
3 3 if (*s++ == '\n' && ((incline == 2) || (PL_in_eval && !PL_rsfp && !incline)))
0 3 if (*s++ == '\n' && ((incline == 2) || (PL_in_eval && !PL_rsfp && !incline)))
0 0 if (*s++ == '\n' && ((incline == 2) || (PL_in_eval && !PL_rsfp && !incline)))
0 0 if (*s++ == '\n' && ((incline == 2) || (PL_in_eval && !PL_rsfp && !incline)))
327 505 13 if (s < PL_bufend && *s == '#') {
5 500 if (s < PL_bufend && *s == '#') {
328 47 0 while (s < PL_bufend && *s != '\n')
42 5 while (s < PL_bufend && *s != '\n')
330 5 0 if (s < PL_bufend) {
332 0 5 if (PL_in_eval && !PL_rsfp && !incline) {
0 0 if (PL_in_eval && !PL_rsfp && !incline) {
0 0 if (PL_in_eval && !PL_rsfp && !incline) {
342 509 15 while (s < PL_bufend && isSPACE(*s)) {
6 503 while (s < PL_bufend && isSPACE(*s)) {
343 0 6 if (*s++ == '\n' && PL_in_eval && !PL_rsfp && !incline)
0 0 if (*s++ == '\n' && PL_in_eval && !PL_rsfp && !incline)
0 0 if (*s++ == '\n' && PL_in_eval && !PL_rsfp && !incline)
0 0 if (*s++ == '\n' && PL_in_eval && !PL_rsfp && !incline)
351 15 503 if (s < PL_bufend || !PL_rsfp || PL_lex_inwhat ||
12 3 if (s < PL_bufend || !PL_rsfp || PL_lex_inwhat ||
12 0 if (s < PL_bufend || !PL_rsfp || PL_lex_inwhat ||
0 12 if (s < PL_bufend || !PL_rsfp || PL_lex_inwhat ||
356 0 12 if ((s = filter_gets(PL_linestr, PL_rsfp,
360 0 0 if (PL_minus_p) {
365 0 0 else if (PL_minus_n) {
391 0 0 if ((PerlIO*)PL_rsfp == PerlIO_stdin())
403 0 12 if (PL_last_uni)
405 0 12 if (PL_last_lop)
412 0 12 if (PL_last_uni)
414 0 12 if (PL_last_lop)
416 3 9 if (!incline)
422 0 12 if (PERLDB_LINE && PL_curstash != PL_debstash) {
0 0 if (PERLDB_LINE && PL_curstash != PL_debstash) {
423 0 0 AV *fileav = CopFILEAV(PL_curcop);
424 0 0 if (fileav) {
442 0 457 if (d >= e)
444 457 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 457 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 457 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
451 0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
454 0 0 if (d + (t - s) > e)
460 210 247 else if (isALNUM(*s))
463 969 210 } while (isWORDCHAR_A(*s) && d < e);
969 0 } while (isWORDCHAR_A(*s) && d < e);
464 0 247 else if ( *s == '\''
0 0 else if ( *s == '\''
0 0 else if ( *s == '\''
0 0 else if ( *s == '\''
0 0 else if ( *s == '\''
0 0 else if ( *s == '\''
465 0 0 && allow_package
466 0 0 && isIDFIRST_lazy_if_safe(s+1, PL_bufend, UTF))
0 0 && isIDFIRST_lazy_if_safe(s+1, PL_bufend, UTF))
0 0 && isIDFIRST_lazy_if_safe(s+1, PL_bufend, UTF))
0 0 && isIDFIRST_lazy_if_safe(s+1, PL_bufend, UTF))
0 0 && isIDFIRST_lazy_if_safe(s+1, PL_bufend, UTF))
0 0 && isIDFIRST_lazy_if_safe(s+1, PL_bufend, UTF))
0 0 && isIDFIRST_lazy_if_safe(s+1, PL_bufend, UTF))
0 0 && isIDFIRST_lazy_if_safe(s+1, PL_bufend, UTF))
472 8 239 else if (*s == ':' && s[1] == ':' && allow_package && s[2] != '$') {
8 0 else if (*s == ':' && s[1] == ':' && allow_package && s[2] != '$') {
8 0 else if (*s == ':' && s[1] == ':' && allow_package && s[2] != '$') {
8 0 else if (*s == ':' && s[1] == ':' && allow_package && s[2] != '$') {
503 6 0 if (*s++ != '#')
505 0 0 while (SPACE_OR_TAB(*s)) s++;
0 0 while (SPACE_OR_TAB(*s)) s++;
506 0 0 if (strnEQ(s, "line", 4))
510 0 0 if (SPACE_OR_TAB(*s))
0 0 if (SPACE_OR_TAB(*s))
514 0 0 while (SPACE_OR_TAB(*s)) s++;
0 0 while (SPACE_OR_TAB(*s)) s++;
515 0 0 if (!isDIGIT(*s))
518 0 0 while (isDIGIT(*s))
520 0 0 while (SPACE_OR_TAB(*s))
0 0 while (SPACE_OR_TAB(*s))
522 0 0 if (*s == '"' && (t = strchr(s+1, '"'))) {
0 0 if (*s == '"' && (t = strchr(s+1, '"'))) {
527 0 0 for (t = s; !isSPACE(*t); t++) ;
530 0 0 while (SPACE_OR_TAB(*e) || *e == '\r' || *e == '\f')
0 0 while (SPACE_OR_TAB(*e) || *e == '\r' || *e == '\f')
0 0 while (SPACE_OR_TAB(*e) || *e == '\r' || *e == '\f')
0 0 while (SPACE_OR_TAB(*e) || *e == '\r' || *e == '\f')
532 0 0 if (*e != '\n' && *e != '\0')
0 0 if (*e != '\n' && *e != '\0')
537 0 0 if (t - s > 0) {
651 0 60 if (isSPACE(*s))
659 60 0 if (!UTF) {
0 60 if (!UTF) {
0 0 if (!UTF) {
60 0 if (!UTF) {
666 0 0 if (!UTF8_IS_INVARIANT(term))
675 60 0 if (term && (tmps = strchr("([{< )]}> )]}>",term)))
60 0 if (term && (tmps = strchr("([{< )]}> )]}>",term)))
688 0 60 if (keep_delims)
764 80 0 SvGROW(sv, SvCUR(sv) + (PL_bufend - s) + 1);
0 80 SvGROW(sv, SvCUR(sv) + (PL_bufend - s) + 1);
769 0 80 if (PL_multi_open == PL_multi_close) {
770 0 0 for (; s < PL_bufend; s++,to++) {
772 0 0 if (*s == '\n' && !PL_rsfp)
0 0 if (*s == '\n' && !PL_rsfp)
775 0 0 if (*s == '\\' && s+1 < PL_bufend && term != '\\') {
0 0 if (*s == '\\' && s+1 < PL_bufend && term != '\\') {
0 0 if (*s == '\\' && s+1 < PL_bufend && term != '\\') {
776 0 0 if (!keep_quoted && s[1] == term)
0 0 if (!keep_quoted && s[1] == term)
784 0 0 else if (*s == term) {
785 0 0 if (termlen == 1)
787 0 0 if (s+termlen <= PL_bufend && memEQ(s, (char*)termstr, termlen))
0 0 if (s+termlen <= PL_bufend && memEQ(s, (char*)termstr, termlen))
790 0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
802 374 22 for (; s < PL_bufend; s++,to++) {
804 22 352 if (*s == '\n' && !PL_rsfp)
2 20 if (*s == '\n' && !PL_rsfp)
807 0 374 if (*s == '\\' && s+1 < PL_bufend) {
0 0 if (*s == '\\' && s+1 < PL_bufend) {
808 0 0 if (!keep_quoted &&
0 0 if (!keep_quoted &&
809 0 0 ((s[1] == PL_multi_open) || (s[1] == PL_multi_close)))
815 58 316 else if (*s == PL_multi_close && --brackets <= 0)
0 58 else if (*s == PL_multi_close && --brackets <= 0)
817 0 316 else if (*s == PL_multi_open)
819 316 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 316 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
0 0 else if (!has_utf8 && !UTF8_IS_INVARIANT((U8)*s) && UTF)
832 58 22 if (s < PL_bufend)
836 20 2 if (to - SvPVX_const(sv) >= 2) {
837 0 20 if ((to[-2] == '\r' && to[-1] == '\n') ||
0 0 if ((to[-2] == '\r' && to[-1] == '\n') ||
2 18 if ((to[-2] == '\r' && to[-1] == '\n') ||
838 0 2 (to[-2] == '\n' && to[-1] == '\r'))
844 0 20 else if (to[-1] == '\r')
847 2 0 else if (to - SvPVX_const(sv) == 1 && to[-1] == '\r')
0 2 else if (to - SvPVX_const(sv) == 1 && to[-1] == '\r')
865 0 20 if (PERLDB_LINE && PL_curstash != PL_debstash) {
0 0 if (PERLDB_LINE && PL_curstash != PL_debstash) {
866 0 0 AV *fileav = CopFILEAV(PL_curcop);
867 0 0 if (fileav) {
885 0 58 if (keep_delims)
889 0 58 if (has_utf8 || PL_encoding)
895 58 0 if (SvCUR(sv) + 5 < SvLEN(sv)) {
909 0 58 if (PL_lex_stuff)
926 0 0 if (isSPACE(*s))
930 0 0 if (isDIGIT(*s)) {
931 0 0 while (isDIGIT(*s)) {
932 0 0 if (d >= e)
939 0 0 if (d >= e)
941 0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
0 0 if (UTF && isIDFIRST_utf8_safe((const U8*) s, (const U8*) PL_bufend)) {
948 0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
0 0 while (isIDCONT_utf8_safe((const U8*) t, (const U8*) PL_bufend)) {
951 0 0 if (d + (t - s) > e)
957 0 0 else if (isALNUM(*s))
960 0 0 } while (isWORDCHAR_A(*s) && d < e);
0 0 } while (isWORDCHAR_A(*s) && d < e);
961 0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
0 0 else if (*s == '\'' && isIDFIRST_lazy_if_safe(s+1,send,UTF)) {
966 0 0 else if (*s == ':' && s[1] == ':') {
0 0 else if (*s == ':' && s[1] == ':') {
976 0 0 if (*d) {
977 0 0 if (PL_lex_state != LEX_NORMAL)
981 0 0 if (*s == '$' && s[1] &&
0 0 if (*s == '$' && s[1] &&
982 0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
0 0 ( isALNUM_lazy_if_safe(s+1,send,UTF)
983 0 0 || s[1] == '$' || s[1] == '{' || strnEQ(s+1,"::",2)) )
0 0 || s[1] == '$' || s[1] == '{' || strnEQ(s+1,"::",2)) )
0 0 || s[1] == '$' || s[1] == '{' || strnEQ(s+1,"::",2)) )
987 0 0 if (*s == '{') {
994 0 0 if (s < send)
997 0 0 if (*d == '^' && *s && isCONTROLVAR(*s)) {
0 0 if (*d == '^' && *s && isCONTROLVAR(*s)) {
0 0 if (*d == '^' && *s && isCONTROLVAR(*s)) {
0 0 if (*d == '^' && *s && isCONTROLVAR(*s)) {
998 0 0 *d = toCTRL(*s);
1001 0 0 if (bracket) {
1002 0 0 if (isSPACE(s[-1])) {
1003 0 0 while (s < send) {
1005 0 0 if (!SPACE_OR_TAB(ch)) {
0 0 if (!SPACE_OR_TAB(ch)) {
1011 0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
0 0 if (isIDFIRST_lazy_if_safe(d,d+destlen,UTF)) {
1013 0 0 if (UTF) {
0 0 if (UTF) {
0 0 if (UTF) {
0 0 if (UTF) {
1015 0 0 while ( (( e < send
0 0 while ( (( e < send
0 0 while ( (( e < send
0 0 while ( (( e < send
0 0 while ( (( e < send
1016 0 0 && isIDFIRST_utf8_safe(e, send))
0 0 && isIDFIRST_utf8_safe(e, send))
0 0 && isIDFIRST_utf8_safe(e, send))
1017 0 0 || *e == ':'))
1020 0 0 while (e < send && isIDFIRST_utf8_safe(e, send))
0 0 while (e < send && isIDFIRST_utf8_safe(e, send))
0 0 while (e < send && isIDFIRST_utf8_safe(e, send))
0 0 while (e < send && isIDFIRST_utf8_safe(e, send))
0 0 while (e < send && isIDFIRST_utf8_safe(e, send))
0 0 while (e < send && isIDFIRST_utf8_safe(e, send))
0 0 while (e < send && isIDFIRST_utf8_safe(e, send))
0 0 while (e < send && isIDFIRST_utf8_safe(e, send))
1028 0 0 while ((isALNUM(*s) || *s == ':') && d < e)
0 0 while ((isALNUM(*s) || *s == ':') && d < e)
0 0 while ((isALNUM(*s) || *s == ':') && d < e)
1030 0 0 if (d >= e)
1034 0 0 while (s < send && SPACE_OR_TAB(*s)) s++;
0 0 while (s < send && SPACE_OR_TAB(*s)) s++;
0 0 while (s < send && SPACE_OR_TAB(*s)) s++;
1035 0 0 if ((*s == '[' || (*s == '{' && strNE(dest, "sub")))) {
0 0 if ((*s == '[' || (*s == '{' && strNE(dest, "sub")))) {
0 0 if ((*s == '[' || (*s == '{' && strNE(dest, "sub")))) {
1054 0 0 else if (!isALNUM(*d) && !isPRINT(*d) /* isCTRL(d) */
0 0 else if (!isALNUM(*d) && !isPRINT(*d) /* isCTRL(d) */
1055 0 0 && isALNUM(*s))
1058 0 0 while (isALNUM(*s) && d < e) {
0 0 while (isALNUM(*s) && d < e) {
1061 0 0 if (d >= e)
1065 0 0 if (*s == '}') {
1067 0 0 if (PL_lex_state == LEX_INTERPNORMAL && !PL_lex_brackets) {
0 0 if (PL_lex_state == LEX_INTERPNORMAL && !PL_lex_brackets) {
1071 0 0 if (funny == '#')