Branch Coverage

IO.xs
Criterion Covered Total %
branch 67 106 63.2


line true false branch
75 0 11 if (!f) {
80 0 11 if (fd < 0) {
86 11 0 if (RETVAL >= 0) {
99 5 6 if (block == 0) {
102 1 5 } else if (block > 0) {
119 6 5 if (newmode != mode) {
121 0 6 if (ret < 0)
153 1 0 if (handle) {
166 0 1 if (PerlIO_getpos(handle, ST(0)) != 0) {
193 2 0 if (handle) {
242 1 0 if (gv)
244 1 0 if (gv && do_open(gv, "+>&", 3, FALSE, 0, 0, fp)) {
1 0 if (gv && do_open(gv, "+>&", 3, FALSE, 0, 0, fp)) {
267 2 2 struct pollfd *fds = nfd ? (struct pollfd *)SvPVX(tmpsv) : (struct pollfd *)tmpsv;
269 2 4 for(i=1, j=0 ; j < nfd ; j++) {
276 4 0 if((ret = poll(fds,nfd,timeout)) >= 0) {
277 2 4 for(i=1, j=0 ; j < nfd ; j++) {
297 6 5 const int ret = io_blocking(aTHX_ handle, items == 1 ? -1 : blk ? 1 : 0);
298 11 0 if(ret >= 0)
311 8200 0 if (handle) {
315 8200 0 if ((SvIOK_notUV(c) && SvIV(c) < 0) || (SvNOK(c) && SvNV(c) < 0.0))
8200 0 if ((SvIOK_notUV(c) && SvIV(c) < 0) || (SvNOK(c) && SvNV(c) < 0.0))
0 8200 if ((SvIOK_notUV(c) && SvIV(c) < 0) || (SvNOK(c) && SvNV(c) < 0.0))
0 0 if ((SvIOK_notUV(c) && SvIV(c) < 0) || (SvNOK(c) && SvNV(c) < 0.0))
319 8072 128 if (UVCHR_IS_INVARIANT(v) || (v <= 0xFF && !PerlIO_isutf8(handle)))
128 7944 if (UVCHR_IS_INVARIANT(v) || (v <= 0xFF && !PerlIO_isutf8(handle)))
0 128 if (UVCHR_IS_INVARIANT(v) || (v <= 0xFF && !PerlIO_isutf8(handle)))
325 0 8072 if (!PerlIO_isutf8(handle))
332 8072 0 if ((Size_t)PerlIO_unread(handle, &buf, len) == len)
354 3 0 OutputStream out = IoOFP(io);
356 3 0 if (in)
358 3 0 RETVAL = PerlIO_error(in) || (out && in != out && PerlIO_error(out));
2 1 RETVAL = PerlIO_error(in) || (out && in != out && PerlIO_error(out));
2 0 RETVAL = PerlIO_error(in) || (out && in != out && PerlIO_error(out));
1 1 RETVAL = PerlIO_error(in) || (out && in != out && PerlIO_error(out));
375 1 0 OutputStream out = IoOFP(io);
377 1 0 if (handle) {
380 1 0 if (in != out)
403 1 0 if (io) {
421 2 0 if (handle)
438 0 0 if (handle)
452 0 0 if (items != 4)
491 1 1 if (!handle)
493 2 0 if (handle) {
495 2 0 if (fd >= 0) {
551 2 45 if (items != 1)
552 1 1 Perl_croak(aTHX_ "usage: $io->%s()", ix ? "getline" : "getlines");
553 9 36 if (!ix && GIMME_V != G_LIST)
2 7 if (!ix && GIMME_V != G_LIST)
557 36 7 myop.op_flags = (ix ? (OPf_WANT_SCALAR | OPf_STACKED) : OPf_WANT_LIST);
571 36 7 if (ix)
574 0 43 XPUSHs(io);
598 0 0 if (fd < 0) {