Branch Coverage

pp_sys.c
Criterion Covered Total %
branch 1846 2716 68.0


line true false branch
300 6503 8 const char * const tmps = POPpconstx;
301 6449 62 const I32 gimme = GIMME_V;
304 5 6506 TAINT_PROPER("``");
305 6507 0 if (PL_op->op_private & OPpOPEN_IN_RAW)
307 0 6507 else if (PL_op->op_private & OPpOPEN_IN_CRLF)
310 6505 2 if (fp) {
312 5 6500 if (type && *type)
5 0 if (type && *type)
315 9 6496 if (gimme == G_VOID) {
317 7 9 while (PerlIO_read(fp, tmpbuf, sizeof tmpbuf) > 0)
320 126 6370 else if (gimme == G_SCALAR) {
325 6066 6369 while (sv_gets(TARG, fp, SvCUR(TARG)) != NULL)
328 0 6369 XPUSHs(TARG);
329 0 6369 SvTAINTED_on(TARG);
334 126 2260 if (sv_gets(sv, fp, 0) == NULL) {
338 0 2260 mXPUSHs(sv);
339 2212 48 if (SvLEN(sv) - SvCUR(sv) > 20) {
342 2260 0 SvTAINTED_on(sv);
345 0 6504 STATUS_NATIVE_CHILD_SET(PerlProc_pclose(fp));
6504 0 STATUS_NATIVE_CHILD_SET(PerlProc_pclose(fp));
0 6504 STATUS_NATIVE_CHILD_SET(PerlProc_pclose(fp));
0 6504 STATUS_NATIVE_CHILD_SET(PerlProc_pclose(fp));
0 0 STATUS_NATIVE_CHILD_SET(PerlProc_pclose(fp));
349 2 0 STATUS_NATIVE_CHILD_SET(-1);
0 0 STATUS_NATIVE_CHILD_SET(-1);
0 0 STATUS_NATIVE_CHILD_SET(-1);
0 0 STATUS_NATIVE_CHILD_SET(-1);
0 0 STATUS_NATIVE_CHILD_SET(-1);
350 2 0 if (gimme == G_SCALAR)
362 1102 8092 GV * const gv = (PL_op->op_flags & OPf_SPECIAL) ? NULL : (GV *)POPs;
368 0 9194 if (SvGMAGICAL(TOPs)) TOPs = sv_2mortal(newSVsv(TOPs));
370 9187 7 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 9194 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
0 0 tryAMAGICunTARGETlist(iter_amg, (PL_op->op_flags & OPf_SPECIAL));
372 8092 1102 if (PL_op->op_flags & OPf_SPECIAL) {
379 883 219 if (PL_globhook) {
391 0 219 if (TAINTING_get) {
429 21 12158 if (SP - MARK > 1) {
435 14 12144 else if (SP == MARK) {
0 14 else if (SP == MARK) {
442 3 12141 if (SvGMAGICAL(exsv)) exsv = sv_mortalcopy(exsv);
445 12172 5 if (SvROK(exsv) || (SvPV_const(exsv, len), len)) {
12156 16 if (SvROK(exsv) || (SvPV_const(exsv, len), len)) {
19 12153 if (SvROK(exsv) || (SvPV_const(exsv, len), len)) {
448 2 17 else {
449 19 0 SV * const errsv = ERRSV;
451 3 16 if (SvROK(errsv)) {
452 1 2 if (SvGMAGICAL(errsv)) {
458 15 1 else if (SvPOKp(errsv) ? SvCUR(errsv) : SvNIOKp(errsv)) {
6 10 else if (SvPOKp(errsv) ? SvCUR(errsv) : SvNIOKp(errsv)) {
467 8 12169 if (SvROK(exsv) && !PL_warnhook)
1 7 if (SvROK(exsv) && !PL_warnhook)
481 131 13645 if (SP - MARK != 1) {
491 13459 317 if (SvROK(exsv) || (SvPV_const(exsv, len), len)) {
13459 0 if (SvROK(exsv) || (SvPV_const(exsv, len), len)) {
127 13332 if (SvROK(exsv) || (SvPV_const(exsv, len), len)) {
494 0 127 else {
495 127 0 SV * const errsv = ERRSV;
497 2 125 if (SvROK(errsv)) {
499 1 1 if (sv_isobject(exsv)) {
503 1 0 SV * const file = sv_2mortal(newSVpv(CopFILE(PL_curcop),0));
506 0 1 PUSHMARK(SP);
517 124 1 else if (SvPOK(errsv) && SvCUR(errsv)) {
1 123 else if (SvPOK(errsv) && SvCUR(errsv)) {
533 10 101295 {
545 0 101305 PUSHSTACKi(PERLSI_MAGIC);
547 0 101305 PUSHMARK(sp);
548 101304 1 PUSHs(SvTIED_obj(sv, mg));
549 96746 4559 if (flags & TIED_METHOD_ARGUMENTS_ON_STACK) {
550 0 96746 Copy(orig_sp + 2, sp + 1, argc, SV*); /* copy args to new stack */
553 71 4488 else if (argc) {
559 0 117 SV *const arg = va_arg(args, SV *);
560 0 117 if(mortalize_not_needed)
564 46 71 } while (--argc);
570 1 101304 if (flags & TIED_METHOD_SAY) {
578 0 101233 POPSTACK;
580 100952 281 if (ret_args) { /* copy results back to original stack */
0 100952 if (ret_args) { /* copy results back to original stack */
582 0 100952 Copy(orig_sp - ret_args + 1, sp + 1, ret_args, SV*);
610 0 2429789 if (!isGV(gv) && !(SvTYPE(gv) == SVt_PVLV && isGV_with_GP(gv)))
0 0 if (!isGV(gv) && !(SvTYPE(gv) == SVt_PVLV && isGV_with_GP(gv)))
0 0 if (!isGV(gv) && !(SvTYPE(gv) == SVt_PVLV && isGV_with_GP(gv)))
0 0 if (!isGV(gv) && !(SvTYPE(gv) == SVt_PVLV && isGV_with_GP(gv)))
613 23688 2406101 if ((io = GvIOp(gv))) {
617 11 23677 if (IoDIRP(io))
620 11 0 HEKfARG(GvENAME_HEK(gv)));
622 2 23686 mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
623 2 23686 if (mg) {
626 1 1 return Perl_tied_method(aTHX_ SV_CONST(OPEN), mark - 1, MUTABLE_SV(io), mg,
632 2429764 23 if (MARK < SP) {
636 12 11 sv = GvSVn(gv);
639 2429759 28 tmps = SvPV_const(sv, len);
642 1585729 844048 if (ok)
643 0 1585729 PUSHi( (I32)PL_forkprocess );
644 4 844044 else if (PL_forkprocess == 0) /* we are a new child */
645 0 4 PUSHi(0);
655 1219462 1 MAXARG == 0 || (!TOPs && !POPs) ? PL_defoutgv : MUTABLE_GV(POPs);
1 1219461 MAXARG == 0 || (!TOPs && !POPs) ? PL_defoutgv : MUTABLE_GV(POPs);
0 1 MAXARG == 0 || (!TOPs && !POPs) ? PL_defoutgv : MUTABLE_GV(POPs);
657 1 1219462 if (MAXARG == 0)
0 1 if (MAXARG == 0)
660 1219463 0 if (gv) {
661 1219463 0 IO * const io = GvIO(gv);
1219455 8 IO * const io = GvIO(gv);
1219455 0 IO * const io = GvIO(gv);
662 1219449 14 if (io) {
663 117 1219332 const MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
664 117 1219332 if (mg) {
665 102 15 return tied_method0(SV_CONST(CLOSE), SP, MUTABLE_SV(io), mg);
669 340 1219003 PUSHs(boolSV(do_close(gv, TRUE)));
685 1318 0 if (!rgv || !wgv)
688 1318 0 if (!isGV_with_GP(rgv) || !isGV_with_GP(wgv))
1318 0 if (!isGV_with_GP(rgv) || !isGV_with_GP(wgv))
1318 0 if (!isGV_with_GP(rgv) || !isGV_with_GP(wgv))
0 1318 if (!isGV_with_GP(rgv) || !isGV_with_GP(wgv))
690 1318 0 rstio = GvIOn(rgv);
1318 0 rstio = GvIOn(rgv);
1318 0 rstio = GvIOn(rgv);
28 1290 rstio = GvIOn(rgv);
691 1318 0 wstio = GvIOn(wgv);
1318 0 wstio = GvIOn(wgv);
1318 0 wstio = GvIOn(wgv);
25 1293 wstio = GvIOn(wgv);
693 7 1311 if (IoIFP(rstio))
695 7 1311 if (IoIFP(wstio))
698 1318 0 if (PerlProc_pipe(fd) < 0)
708 1318 0 if (!IoIFP(rstio) || !IoOFP(wstio)) {
0 1318 if (!IoIFP(rstio) || !IoOFP(wstio)) {
709 0 0 if (IoIFP(rstio))
713 0 0 if (IoOFP(wstio))
740 0 4863 if (MAXARG < 1)
743 4863 0 io = GvIO(gv);
4812 51 io = GvIO(gv);
4812 0 io = GvIO(gv);
745 4797 66 if (io
746 11 4786 && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar)))
11 4786 && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar)))
748 5 6 return tied_method0(SV_CONST(FILENO), SP, MUTABLE_SV(io), mg);
751 4786 66 if (!io || !(fp = IoIFP(io))) {
55 4731 if (!io || !(fp = IoIFP(io))) {
760 0 4731 PUSHi(PerlIO_fileno(fp));
772 69 237 if (MAXARG < 1 || (!TOPs && !POPs)) {
1 68 if (MAXARG < 1 || (!TOPs && !POPs)) {
1 0 if (MAXARG < 1 || (!TOPs && !POPs)) {
777 206 32 if (anum != 022)
781 66 2 anum = PerlLIO_umask(POPi);
782 0 306 TAINT_PROPER("umask");
783 0 306 XPUSHi(anum);
0 306 XPUSHi(anum);
803 0 1557049 if (MAXARG < 1)
805 5715 1551334 if (MAXARG > 1) {
810 1557049 0 io = GvIO(gv);
1557047 2 io = GvIO(gv);
1557047 0 io = GvIO(gv);
812 1557047 2 if (io) {
813 1 1557046 const MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
814 1 1557046 if (mg) {
819 0 1 return Perl_tied_method(aTHX_ SV_CONST(BINMODE), SP, MUTABLE_SV(io), mg,
825 1557046 2 if (!io || !(fp = IoIFP(io))) {
8 1557038 if (!io || !(fp = IoIFP(io))) {
836 5712 1551326 if (discp)
837 5711 1 d = SvPV_const(discp, len);
839 1557036 2 if (PerlIO_binmode(aTHX_ fp, IoTYPE(io), mode, d)) {
840 184219 1372817 if (IoOFP(io) && IoOFP(io) != IoIFP(io)) {
8 184211 if (IoOFP(io) && IoOFP(io) != IoIFP(io)) {
841 0 8 if (!PerlIO_binmode(aTHX_ IoOFP(io), IoTYPE(io), mode, d)) {
873 1 10335 if (HvLAZYDEL(varsv) && (entry = HvEITER((HV *)varsv))) {
1 0 if (HvLAZYDEL(varsv) && (entry = HvEITER((HV *)varsv))) {
882 2 3091 if (!AvREAL(varsv)) {
883 0 2 if (!AvREIFY(varsv))
892 16148 1 if (isGV_with_GP(varsv) && !SvFAKE(varsv)) {
16148 0 if (isGV_with_GP(varsv) && !SvFAKE(varsv)) {
16146 2 if (isGV_with_GP(varsv) && !SvFAKE(varsv)) {
897 15910 236 if (!GvIOp(varsv))
902 1 2 if (SvTYPE(varsv) == SVt_PVLV && LvTYPE(varsv) == 'y') {
1 0 if (SvTYPE(varsv) == SVt_PVLV && LvTYPE(varsv) == 'y') {
913 14832 15292 if (sv_isobject(*MARK)) { /* Calls GET magic. */
0 14832 if (sv_isobject(*MARK)) { /* Calls GET magic. */
0 15290 if (sv_isobject(*MARK)) { /* Calls GET magic. */
915 0 14832 PUSHSTACKi(PERLSI_MAGIC);
916 0 14832 PUSHMARK(SP);
918 14832 14832 while (items--)
930 15291 1 if (!stash || !(gv = gv_fetchmethod(stash, methname))) {
1 15290 if (!stash || !(gv = gv_fetchmethod(stash, methname))) {
931 1 1 DIE(aTHX_ "Can't locate object method \"%s\" via package \"%"SVf"\"",
932 1 0 methname, SVfARG(SvOK(*MARK) ? *MARK : &PL_sv_no));
0 1 methname, SVfARG(SvOK(*MARK) ? *MARK : &PL_sv_no));
935 105 15185 PUSHSTACKi(PERLSI_MAGIC);
936 0 15290 PUSHMARK(SP);
938 28741 15290 while (items--)
946 0 30118 POPSTACK;
947 30107 11 if (sv_isobject(sv)) {
950 5 30102 if (varsv == SvRV(sv) &&
1 4 if (varsv == SvRV(sv) &&
955 30102 4 sv_magic(varsv, (SvRV(sv) == varsv ? NULL : sv), how, NULL, 0);
968 12378 3058 const char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
971 12307 3129 if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
12307 0 if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
12304 3 if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
0 12304 if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
974 2 15434 if (SvTYPE(sv) == SVt_PVLV && LvTYPE(sv) == 'y' &&
2 0 if (SvTYPE(sv) == SVt_PVLV && LvTYPE(sv) == 'y' &&
1 1 if (SvTYPE(sv) == SVt_PVLV && LvTYPE(sv) == 'y' &&
977 15342 93 if ((mg = SvTIED_mg(sv, how))) {
15342 93 if ((mg = SvTIED_mg(sv, how))) {
978 15341 1 SV * const obj = SvRV(SvTIED_obj(sv, mg));
979 15340 2 if (obj) {
982 12260 3080 if (gv && isGV(gv) && (cv = GvCV(gv))) {
12260 0 if (gv && isGV(gv) && (cv = GvCV(gv))) {
12260 0 if (gv && isGV(gv) && (cv = GvCV(gv))) {
983 0 12260 PUSHMARK(SP);
984 12260 0 PUSHs(SvTIED_obj(MUTABLE_SV(gv), mg));
985 0 12260 mXPUSHi(SvREFCNT(obj) - 1);
992 3080 0 else if (mg && SvREFCNT(obj) > 1) {
12 3068 else if (mg && SvREFCNT(obj) > 1) {
1009 3192 163 const char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV)
1012 2596 759 if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
2596 0 if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
2593 3 if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
1 2592 if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
1015 3 3351 if (SvTYPE(sv) == SVt_PVLV && LvTYPE(sv) == 'y' &&
3 0 if (SvTYPE(sv) == SVt_PVLV && LvTYPE(sv) == 'y' &&
1 2 if (SvTYPE(sv) == SVt_PVLV && LvTYPE(sv) == 'y' &&
1018 1403 1950 if ((mg = SvTIED_mg(sv, how))) {
1402 1951 if ((mg = SvTIED_mg(sv, how))) {
1019 1402 0 PUSHs(SvTIED_obj(sv, mg));
1026 0 7 {
1035 8 1 if (!stash || !(gv = gv_fetchmethod(stash, "TIEHASH"))) {
3 5 if (!stash || !(gv = gv_fetchmethod(stash, "TIEHASH"))) {
1039 3 1 if (!stash || !(gv = gv_fetchmethod(stash, "TIEHASH")))
1 2 if (!stash || !(gv = gv_fetchmethod(stash, "TIEHASH")))
1044 0 7 PUSHMARK(SP);
1049 6 1 if (SvIV(right))
6 1 if (SvIV(right))
1054 1 0 if (!SvOK(right)) right = &PL_sv_no;
1 0 if (!SvOK(right)) right = &PL_sv_no;
1 0 if (!SvOK(right)) right = &PL_sv_no;
1061 4 3 if (!sv_isobject(TOPs)) {
1063 0 4 PUSHMARK(SP);
1073 3 4 if (sv_isobject(TOPs)) {
1110 1 14291 for (i = 1; i <= 3; i++) {
14292 4762 for (i = 1; i <= 3; i++) {
1113 9517 4775 if (!SvOK(sv))
9517 0 if (!SvOK(sv))
9517 0 if (!SvOK(sv))
1115 9 4766 if (SvREADONLY(sv)) {
1116 9 0 if (!(SvPOK(sv) && SvCUR(sv) == 0))
3 6 if (!(SvPOK(sv) && SvCUR(sv) == 0))
1119 78 4688 else if (SvIsCOW(sv)) sv_force_normal_flags(sv, 0);
1120 1 4771 if (!SvPOK(sv)) {
1121 1 0 if (!SvPOKp(sv))
1124 1 0 SvPV_force_nomg_nolen(sv); /* force string conversion */
1127 4740 32 if (maxlen < j)
1162 4347 415 if (SvOK(sv)) {
4347 0 if (SvOK(sv)) {
0 4347 if (SvOK(sv)) {
1163 369 46 value = SvNV(sv);
1164 0 415 if (value < 0.0)
1173 14286 4762 for (i = 1; i <= 3; i++) {
1175 9517 4769 if (!SvOK(sv) || SvCUR(sv) == 0) {
9517 0 if (!SvOK(sv) || SvCUR(sv) == 0) {
0 9517 if (!SvOK(sv) || SvCUR(sv) == 0) {
24 4745 if (!SvOK(sv) || SvCUR(sv) == 0) {
1181 79 4666 if (j < growsize) {
1186 601981 4745 while (++j <= growsize) {
1219 14286 4762 for (i = 1; i <= 3; i++) {
1220 4745 9541 if (fd_sets[i]) {
1230 1 4744 SvSETMAGIC(sv);
1234 0 4762 PUSHi(nfound);
1235 4758 4 if (GIMME == G_ARRAY && tbuf) {
0 4762 if (GIMME == G_ARRAY && tbuf) {
0 0 if (GIMME == G_ARRAY && tbuf) {
1271 23181 457 GV * const newdefout = (PL_op->op_private > 0) ? (MUTABLE_GV(POPs)) : NULL;
1272 23638 0 GV * egv = GvEGVx(PL_defoutgv);
23638 0 GV * egv = GvEGVx(PL_defoutgv);
1275 0 23638 if (!egv)
1277 23638 0 hv = isGV_with_GP(egv) ? GvSTASH(egv) : NULL;
23638 0 hv = isGV_with_GP(egv) ? GvSTASH(egv) : NULL;
1278 23637 0 gvp = hv && HvENAME(hv)
23637 0 gvp = hv && HvENAME(hv)
23635 2 gvp = hv && HvENAME(hv)
0 23635 gvp = hv && HvENAME(hv)
0 23635 gvp = hv && HvENAME(hv)
23635 0 gvp = hv && HvENAME(hv)
23635 0 gvp = hv && HvENAME(hv)
1279 2 23633 ? (GV**)hv_fetch(hv, GvNAME(egv), HEK_UTF8(GvNAME_HEK(egv)) ? -GvNAMELEN(egv) : GvNAMELEN(egv), FALSE)
1280 23637 1 : NULL;
1281 16643 6995 if (gvp && *gvp == egv) {
16641 2 if (gvp && *gvp == egv) {
1283 0 16641 XPUSHTARG;
0 16641 XPUSHTARG;
1286 0 6997 mXPUSHs(newRV(MUTABLE_SV(egv)));
1289 23179 459 if (newdefout) {
1290 23179 0 if (!GvIO(newdefout))
23179 0 if (!GvIO(newdefout))
23179 0 if (!GvIO(newdefout))
78 23101 if (!GvIO(newdefout))
1302 16487 0 MAXARG==0 || (!TOPs && !POPs) ? PL_stdingv : MUTABLE_GV(POPs);
1 16486 MAXARG==0 || (!TOPs && !POPs) ? PL_stdingv : MUTABLE_GV(POPs);
0 1 MAXARG==0 || (!TOPs && !POPs) ? PL_stdingv : MUTABLE_GV(POPs);
1303 16487 0 IO *const io = GvIO(gv);
16486 1 IO *const io = GvIO(gv);
16486 0 IO *const io = GvIO(gv);
1305 0 16487 if (MAXARG == 0)
0 0 if (MAXARG == 0)
1308 16486 1 if (io) {
1309 38 16448 const MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
1310 38 16448 if (mg) {
1311 38 0 const U32 gimme = GIMME_V;
1312 29 9 Perl_tied_method(aTHX_ SV_CONST(GETC), SP, MUTABLE_SV(io), mg, gimme, 0);
1313 33 0 if (gimme == G_SCALAR) {
1315 33 0 SvSetMagicSV_nosteal(TARG, TOPs);
0 33 SvSetMagicSV_nosteal(TARG, TOPs);
1320 16449 0 if (!gv || do_eof(gv)) { /* make sure we have fp with something */
11 16438 if (!gv || do_eof(gv)) { /* make sure we have fp with something */
1321 10 1 if (!io || (!IoIFP(io) && IoTYPE(io) != IoTYPE_WRONLY))
6 4 if (!io || (!IoIFP(io) && IoTYPE(io) != IoTYPE_WRONLY))
6 0 if (!io || (!IoIFP(io) && IoTYPE(io) != IoTYPE_WRONLY))
1329 8203 8235 if (PerlIO_isutf8(IoIFP(GvIOp(gv)))) {
1332 8074 129 if (len > 1) {
1333 8074 0 SvGROW(TARG,len+1);
0 8074 SvGROW(TARG,len+1);
1339 0 16438 PUSHTARG;
1348 399 15 const I32 gimme = GIMME_V;
1352 414 0 if (cv && CvCLONE(cv))
167 247 if (cv && CvCLONE(cv))
1358 412 0 PUSHBLOCK(cx, CXt_FORMAT, PL_stack_sp);
1359 402 10 PUSHFORMAT(cx, retop);
1360 10 402 if (CvDEPTH(cv) >= 2) {
1381 220 189 if (MAXARG == 0) {
0 220 if (MAXARG == 0) {
1387 1 188 if (!gv)
1390 409 0 io = GvIO(gv);
409 0 io = GvIO(gv);
409 0 io = GvIO(gv);
1391 0 409 if (!io) {
1394 154 255 if (IoFMT_GV(io))
1402 10 399 if (!cv) {
1423 377 2 if (!io || !(ofp = IoOFP(io)))
298 79 if (!io || !(ofp = IoOFP(io)))
1429 92 206 if (IoLINES_LEFT(io) < FmLINES(PL_formtarget) &&
92 0 if (IoLINES_LEFT(io) < FmLINES(PL_formtarget) &&
1434 69 23 if (!IoTOP_GV(io)) {
1437 64 5 if (!IoTOP_NAME(io)) {
1439 54 10 if (!IoFMT_NAME(io))
1444 1 63 if ((topgv && GvFORM(topgv)) ||
1451 1 68 if (!topgv || !GvFORM(topgv)) {
0 1 if (!topgv || !GvFORM(topgv)) {
1457 11 13 if (IoFLAGS(io) & IOf_DIDTOP) { /* Oh dear. It still doesn't fit. */
1460 9 2 if (lines <= 0) /* Yow, header didn't even fit!!! */
1462 21 9 while (lines-- > 0) {
1464 21 0 if (!s)
1468 9 0 if (s) {
1477 21 1 if (IoLINES_LEFT(io) >= 0 && IoPAGE(io) > 0)
14 7 if (IoLINES_LEFT(io) >= 0 && IoPAGE(io) > 0)
1486 7 15 if (!cv) {
1497 357 0 POPFORMAT(cx);
347 10 POPFORMAT(cx);
1501 355 2 if (!io || !(fp = IoOFP(io))) {
79 276 if (!io || !(fp = IoOFP(io))) {
1502 79 2 if (io && IoIFP(io))
2 77 if (io && IoIFP(io))
1509 2 274 if ((IoLINES_LEFT(io) -= FmLINES(PL_formtarget)) < 0) {
1512 0 276 if (!do_print(PL_formtarget, fp))
1518 9 267 if (IoFLAGS(io) & IOf_FLUSH)
1534 224469 1130 = (PL_op->op_flags & OPf_STACKED) ? MUTABLE_GV(*++MARK) : PL_defoutgv;
1535 225599 0 IO *const io = GvIO(gv);
225599 0 IO *const io = GvIO(gv);
225599 0 IO *const io = GvIO(gv);
1538 1 225598 if (MARK == SP) XPUSHs(&PL_sv_no);
0 1 if (MARK == SP) XPUSHs(&PL_sv_no);
1540 225595 4 if (io) {
1541 66 225529 const MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
1542 66 225529 if (mg) {
1543 26 40 if (MARK == ORIGMARK) {
1544 0 26 MEXTEND(SP, 1);
1546 0 26 Move(MARK, MARK + 1, (SP - MARK) + 1, SV*);
1549 48 18 return Perl_tied_method(aTHX_ SV_CONST(PRINTF), mark - 1, MUTABLE_SV(io),
1556 4 225529 if (!io) {
1561 7 225522 else if (!(fp = IoOFP(io))) {
1562 3 4 if (IoIFP(io))
1564 2 2 else if (ckWARN(WARN_CLOSED))
1572 225517 0 if (!do_print(sv, fp))
1575 263 225254 if (IoFLAGS(io) & IOf_FLUSH)
1576 263 0 if (PerlIO_flush(fp) == EOF)
1593 3212 16 const int perm = (MAXARG > 3 && (TOPs || POPs)) ? POPi : 0666;
1 3211 const int perm = (MAXARG > 3 && (TOPs || POPs)) ? POPi : 0666;
0 1 const int perm = (MAXARG > 3 && (TOPs || POPs)) ? POPi : 0666;
3210 1 const int perm = (MAXARG > 3 && (TOPs || POPs)) ? POPi : 0666;
1594 3226 2 const int mode = POPi;
1600 3222 6 const char * const tmps = SvPV_const(sv, len);
1602 3224 4 if (do_open(gv, tmps, len, TRUE, mode, perm, NULL)) {
1633 136485 8 if ((PL_op->op_type == OP_READ || PL_op->op_type == OP_SYSREAD)
1634 136485 0 && gv && (io = GvIO(gv)) )
136485 0 && gv && (io = GvIO(gv)) )
136480 5 && gv && (io = GvIO(gv)) )
136480 0 && gv && (io = GvIO(gv)) )
136480 5 && gv && (io = GvIO(gv)) )
1636 78 136402 const MAGIC *const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
1637 78 136402 if (mg) {
1638 64 14 return Perl_tied_method(aTHX_ SV_CONST(READ), mark - 1, MUTABLE_SV(io), mg,
1644 136415 0 if (!gv)
1647 19106 117309 if (! SvOK(bufsv))
19106 0 if (! SvOK(bufsv))
19106 0 if (! SvOK(bufsv))
1649 136411 4 length = SvIVx(*++MARK);
1650 1 136414 if (length < 0)
1653 111419 24995 if (MARK < SP)
1654 111417 2 offset = SvIVx(*++MARK);
1657 136414 0 io = GvIO(gv);
136409 5 io = GvIO(gv);
136409 0 io = GvIO(gv);
1658 136409 5 if (!io || !IoIFP(io)) {
5 136404 if (!io || !IoIFP(io)) {
1663 822 135582 if ((fp_utf8 = PerlIO_isutf8(IoIFP(io))) && !IN_BYTES) {
822 0 if ((fp_utf8 = PerlIO_isutf8(IoIFP(io))) && !IN_BYTES) {
1664 431 391 buffer = SvPVutf8_force(bufsv, blen);
1670 128148 7434 buffer = SvPV_force(bufsv, blen);
1671 135552 30 buffer_utf8 = !IN_BYTES && SvUTF8(bufsv);
135296 256 buffer_utf8 = !IN_BYTES && SvUTF8(bufsv);
1673 1078 135326 if (DO_UTF8(bufsv)) {
1078 0 if (DO_UTF8(bufsv)) {
1683 8 136396 if (PL_op->op_type == OP_RECV) {
1695 8 0 buffer = SvGROW(bufsv, (STRLEN)(length+1));
3 5 buffer = SvGROW(bufsv, (STRLEN)(length+1));
1699 2 6 if (count < 0)
1702 0 6 if (count > length)
1707 0 6 if (fp_utf8)
1709 0 6 SvSETMAGIC(bufsv);
1711 6 0 if (!(IoFLAGS(io) & IOf_UNTAINT))
1712 0 6 SvTAINTED_on(bufsv);
1719 642 135754 if (offset < 0) {
1720 1 641 if (-offset > (SSize_t)blen)
1724 1078 135317 if (DO_UTF8(bufsv)) {
1078 0 if (DO_UTF8(bufsv)) {
1726 133 945 if (offset >= (SSize_t)blen)
1738 137225 0 buffer = SvGROW(bufsv, (STRLEN)(length+offset+1));
3117 134108 buffer = SvGROW(bufsv, (STRLEN)(length+offset+1));
1739 162 137063 if (offset > 0 && offset > (SSize_t)orig_size) { /* Zero any newly allocated space */
1755 256 0 buffer = SvGROW(read_target, (STRLEN)(length + 1));
256 0 buffer = SvGROW(read_target, (STRLEN)(length + 1));
1758 10175 127050 if (PL_op->op_type == OP_SYSREAD) {
1789 23037 104012 if (count == 0 && PerlIO_error(IoIFP(io)))
2 23035 if (count == 0 && PerlIO_error(IoIFP(io)))
1792 13 137211 if (count < 0) {
1793 2 11 if (IoTYPE(io) == IoTYPE_WRONLY)
1800 1651 135560 if (fp_utf8 && !IN_BYTES) {
1651 0 if (fp_utf8 && !IN_BYTES) {
1803 2008 1238 while (buffer < bend) {
1804 1595 413 if (charstart) {
1808 413 1595 if (buffer - charskip + skip > bend) {
1826 417 821 if (got < wanted && count == length) {
1835 256 135304 else if (buffer_utf8) {
1840 1078 135303 SvSETMAGIC(bufsv);
1842 136381 0 if (!(IoFLAGS(io) & IOf_UNTAINT))
1843 0 136381 SvTAINTED_on(bufsv);
1845 0 136381 PUSHi(count);
1865 3789 0 IO *const io = GvIO(gv);
3787 2 IO *const io = GvIO(gv);
3787 0 IO *const io = GvIO(gv);
1867 3764 25 if (op_type == OP_SYSWRITE && io) {
1868 13 3751 const MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
1869 13 3751 if (mg) {
1870 1 12 if (MARK == SP - 1) {
1872 0 1 mXPUSHi(sv_len(sv));
1876 2 11 return Perl_tied_method(aTHX_ SV_CONST(WRITE), mark - 1, MUTABLE_SV(io), mg,
1881 3776 0 if (!gv)
1887 3774 2 if (!io || !IoIFP(io) || IoTYPE(io) == IoTYPE_RDONLY) {
3754 20 if (!io || !IoIFP(io) || IoTYPE(io) == IoTYPE_RDONLY) {
2 3752 if (!io || !IoIFP(io) || IoTYPE(io) == IoTYPE_RDONLY) {
1889 22 2 if (io && IoIFP(io))
2 20 if (io && IoIFP(io))
1898 3703 49 buffer = SvPV_const(bufsv, blen);
1900 46 3706 doing_utf8 = DO_UTF8(bufsv);
0 46 doing_utf8 = DO_UTF8(bufsv);
1902 62 3690 if (PerlIO_isutf8(IoIFP(io))) {
1903 28 34 if (!SvUTF8(bufsv)) {
1910 12 3678 else if (doing_utf8) {
1913 12 0 if (!doing_utf8) {
1920 0 0 Perl_croak(aTHX_ "Wide character in %s", OP_DESC(PL_op));
0 0 Perl_croak(aTHX_ "Wide character in %s", OP_DESC(PL_op));
1925 7 3745 if (op_type == OP_SEND) {
1926 7 0 const int flags = SvIVx(*++MARK);
1927 2 5 if (SP > MARK) {
1929 2 0 char * const sockbuf = SvPVx(*++MARK, mlen);
1945 62 3683 if (doing_utf8) {
1946 34 28 if (tmpbuf) {
1953 34 0 blen_chars = sv_or_pv_len_utf8(bufsv, buffer, blen);
12 22 blen_chars = sv_or_pv_len_utf8(bufsv, buffer, blen);
12 0 blen_chars = sv_or_pv_len_utf8(bufsv, buffer, blen);
12 0 blen_chars = sv_or_pv_len_utf8(bufsv, buffer, blen);
1959 1736 2009 if (MARK >= SP) {
1965 1736 0 length = (Size_t)SvIVx(*++MARK);
1967 1 1735 if ((SSize_t)length < 0) {
1973 1700 2044 if (MARK < SP) {
1974 1700 0 offset = SvIVx(*++MARK);
1975 2 1698 if (offset < 0) {
1976 1 1 if (-offset > (IV)blen_chars) {
1981 3 1695 } else if (offset > (IV)blen_chars) {
1987 2 3738 if (length > blen_chars - offset)
1989 62 3678 if (doing_utf8) {
1991 34 28 if (tmpbuf || SvGMAGICAL(bufsv) || SvAMAGIC(bufsv)) {
34 0 if (tmpbuf || SvGMAGICAL(bufsv) || SvAMAGIC(bufsv)) {
12 22 if (tmpbuf || SvGMAGICAL(bufsv) || SvAMAGIC(bufsv)) {
12 0 if (tmpbuf || SvGMAGICAL(bufsv) || SvAMAGIC(bufsv)) {
12 0 if (tmpbuf || SvGMAGICAL(bufsv) || SvAMAGIC(bufsv)) {
2030 3745 2 if (retval < 0)
2033 62 3683 if (doing_utf8)
2040 0 3745 PUSHi(retval);
2068 805 334 if (MAXARG) {
0 334 if (MAXARG) {
2075 11 323 if (PL_op->op_flags & OPf_SPECIAL) {
2076 11 0 gv = PL_last_in_gv = GvEGVx(PL_argvgv); /* eof() - ARGV magic */
11 0 gv = PL_last_in_gv = GvEGVx(PL_argvgv); /* eof() - ARGV magic */
2085 0 1139 if (!gv)
2088 1139 0 if ((io = GvIO(gv)) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) {
1139 0 if ((io = GvIO(gv)) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) {
1139 0 if ((io = GvIO(gv)) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) {
1089 50 if ((io = GvIO(gv)) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) {
25 1064 if ((io = GvIO(gv)) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) {
25 1064 if ((io = GvIO(gv)) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) {
2089 16 9 return tied_method1(SV_CONST(EOF), SP, MUTABLE_SV(io), mg, newSVuv(which));
2092 331 783 if (!MAXARG && (PL_op->op_flags & OPf_SPECIAL)) { /* eof() */
10 321 if (!MAXARG && (PL_op->op_flags & OPf_SPECIAL)) { /* eof() */
2093 10 0 if (io && !IoIFP(io)) {
3 7 if (io && !IoIFP(io)) {
2094 2 1 if ((IoFLAGS(io) & IOf_START) && av_len(GvAVn(gv)) < 0) {
2 0 if ((IoFLAGS(io) & IOf_START) && av_len(GvAVn(gv)) < 0) {
2 0 if ((IoFLAGS(io) & IOf_START) && av_len(GvAVn(gv)) < 0) {
2098 1 1 if (GvSV(gv))
2102 0 2 SvSETMAGIC(GvSV(gv));
2104 0 1 else if (!nextargv(gv))
2109 1009 105 PUSHs(boolSV(do_eof(gv)));
2119 5229 18 if (MAXARG != 0 && (TOPs || POPs))
1 5228 if (MAXARG != 0 && (TOPs || POPs))
0 1 if (MAXARG != 0 && (TOPs || POPs))
0 19 if (MAXARG != 0 && (TOPs || POPs))
2125 5244 3 io = GvIO(gv);
5242 2 io = GvIO(gv);
5242 0 io = GvIO(gv);
2126 5242 5 if (io) {
2127 114 5128 const MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
2128 114 5128 if (mg) {
2129 105 9 return tied_method0(SV_CONST(TELL), SP, MUTABLE_SV(io), mg);
2132 3 2 else if (!gv) {
2133 0 3 if (!errno)
2135 0 3 PUSHi(-1);
2142 0 5130 PUSHi( do_tell(gv) );
2150 30571 2 const int whence = POPi;
2154 30571 2 const Off_t offset = (Off_t)SvIVx(POPs);
2158 30573 0 IO *const io = GvIO(gv);
30567 6 IO *const io = GvIO(gv);
30567 0 IO *const io = GvIO(gv);
2160 30567 6 if (io) {
2161 46 30521 const MAGIC * const mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar);
2162 46 30521 if (mg) {
2169 39 7 return tied_method2(SV_CONST(SEEK), SP, MUTABLE_SV(io), mg, offset_sv,
2174 30415 112 if (PL_op->op_type == OP_SEEK)
2175 10 30405 PUSHs(boolSV(do_seek(gv, offset, whence)));
2178 7 105 if (sought < 0)
2187 104 1 : newSVpvn(zero_but_true, ZBTLEN);
2208 163871 0 len = (Off_t)POPi;
2220 161615 2256 if (PL_op->op_flags & OPf_SPECIAL
163865 6 if (PL_op->op_flags & OPf_SPECIAL
2222 0 2256 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
4 2252 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
0 4 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
2248 4 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
2247 1 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
0 2247 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
2246 1 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
0 2246 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
2246 1 : !!(tmpgv = MAYBE_DEREF_GV(sv)) ) {
2223 163864 1 io = GvIO(tmpgv);
163864 0 io = GvIO(tmpgv);
163864 0 io = GvIO(tmpgv);
2224 163860 5 if (!io)
2229 0 163861 TAINT_PROPER("truncate");
2230 163859 2 if (!(fp = IoIFP(io))) {
2236 2 163857 if (ftruncate(PerlIO_fileno(fp), len) < 0)
2244 2 4 else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
1 1 else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
2249 4 1 const char * const name = SvPV_nomg_const_nolen(sv);
2250 0 5 TAINT_PROPER("truncate");
2252 2 3 if (truncate(name, len) < 0)
2269 163860 11 if (result)
2271 7 4 if (!errno)
2281 0 67 const unsigned int func = POPu;
2284 67 0 IO * const io = gv ? GvIOn(gv) : NULL;
67 0 IO * const io = gv ? GvIOn(gv) : NULL;
67 0 IO * const io = gv ? GvIOn(gv) : NULL;
67 0 IO * const io = gv ? GvIOn(gv) : NULL;
67 0 IO * const io = gv ? GvIOn(gv) : NULL;
2288 67 0 if (!io || !argsv || !IoIFP(io)) {
1 66 if (!io || !argsv || !IoIFP(io)) {
2294 66 0 if (SvPOK(argsv) || !SvNIOK(argsv)) {
0 66 if (SvPOK(argsv) || !SvNIOK(argsv)) {
2297 0 0 s = SvPV_force(argsv, len);
2299 0 0 if (len < need) {
2307 66 0 retval = SvIV(argsv);
2311 0 66 TAINT_PROPER(PL_op_desc[optype]);
2313 0 66 if (optype == OP_IOCTL)
2331 0 66 if (SvPOK(argsv)) {
2332 0 0 if (s[SvCUR(argsv)] != 17)
2333 0 0 DIE(aTHX_ "Possible memory corruption: %s overflowed 3rd argument",
2334 0 0 OP_NAME(PL_op));
2336 0 0 SvSETMAGIC(argsv); /* Assume it has changed */
2339 0 66 if (retval == -1)
2341 33 33 if (retval != 0) {
2342 0 33 PUSHi(retval);
2345 0 33 PUSHp(zero_but_true, ZBTLEN);
2356 1162336 1 const int argtype = POPi;
2358 1162337 0 IO *const io = GvIO(gv);
1162334 3 IO *const io = GvIO(gv);
1162334 0 IO *const io = GvIO(gv);
2359 1162334 3 PerlIO *const fp = io ? IoIFP(io) : NULL;
2362 1162328 9 if (fp) {
2371 0 1162337 PUSHi(value);
2385 59 1 const int protocol = POPi;
2386 59 1 const int type = POPi;
2387 59 1 const int domain = POPi;
2389 60 0 IO * const io = gv ? GvIOn(gv) : NULL;
60 0 IO * const io = gv ? GvIOn(gv) : NULL;
60 0 IO * const io = gv ? GvIOn(gv) : NULL;
60 0 IO * const io = gv ? GvIOn(gv) : NULL;
52 8 IO * const io = gv ? GvIOn(gv) : NULL;
2392 0 60 if (!io) {
2394 0 0 if (io && IoIFP(io))
0 0 if (io && IoIFP(io))
2400 2 58 if (IoIFP(io))
2403 0 60 TAINT_PROPER("socket");
2405 1 59 if (fd < 0)
2410 59 0 if (!IoIFP(io) || !IoOFP(io)) {
0 59 if (!IoIFP(io) || !IoOFP(io)) {
2411 0 0 if (IoIFP(io)) PerlIO_close(IoIFP(io));
2412 0 0 if (IoOFP(io)) PerlIO_close(IoOFP(io));
2413 0 0 if (!IoIFP(io) && !IoOFP(io)) PerlLIO_close(fd);
0 0 if (!IoIFP(io) && !IoOFP(io)) PerlLIO_close(fd);
2428 25 1 const int protocol = POPi;
2429 25 1 const int type = POPi;
2430 25 1 const int domain = POPi;
2433 26 0 IO * const io1 = gv1 ? GvIOn(gv1) : NULL;
26 0 IO * const io1 = gv1 ? GvIOn(gv1) : NULL;
26 0 IO * const io1 = gv1 ? GvIOn(gv1) : NULL;
26 0 IO * const io1 = gv1 ? GvIOn(gv1) : NULL;
3 23 IO * const io1 = gv1 ? GvIOn(gv1) : NULL;
2434 26 0 IO * const io2 = gv2 ? GvIOn(gv2) : NULL;
26 0 IO * const io2 = gv2 ? GvIOn(gv2) : NULL;
26 0 IO * const io2 = gv2 ? GvIOn(gv2) : NULL;
26 0 IO * const io2 = gv2 ? GvIOn(gv2) : NULL;
3 23 IO * const io2 = gv2 ? GvIOn(gv2) : NULL;
2437 0 26 if (!io1)
2439 0 26 if (!io2)
2442 26 0 if (io1 && IoIFP(io1))
0 26 if (io1 && IoIFP(io1))
2444 26 0 if (io2 && IoIFP(io2))
0 26 if (io2 && IoIFP(io2))
2447 0 26 if (!io1 || !io2)
2450 0 26 TAINT_PROPER("socketpair");
2451 2 24 if (PerlSock_socketpair(domain, type, protocol, fd) < 0)
2459 24 0 if (!IoIFP(io1) || !IoOFP(io1) || !IoIFP(io2) || !IoOFP(io2)) {
24 0 if (!IoIFP(io1) || !IoOFP(io1) || !IoIFP(io2) || !IoOFP(io2)) {
24 0 if (!IoIFP(io1) || !IoOFP(io1) || !IoIFP(io2) || !IoOFP(io2)) {
0 24 if (!IoIFP(io1) || !IoOFP(io1) || !IoIFP(io2) || !IoOFP(io2)) {
2460 0 0 if (IoIFP(io1)) PerlIO_close(IoIFP(io1));
2461 0 0 if (IoOFP(io1)) PerlIO_close(IoOFP(io1));
2462 0 0 if (!IoIFP(io1) && !IoOFP(io1)) PerlLIO_close(fd[0]);
0 0 if (!IoIFP(io1) && !IoOFP(io1)) PerlLIO_close(fd[0]);
2463 0 0 if (IoIFP(io2)) PerlIO_close(IoIFP(io2));
2464 0 0 if (IoOFP(io2)) PerlIO_close(IoOFP(io2));
2465 0 0 if (!IoIFP(io2) && !IoOFP(io2)) PerlLIO_close(fd[1]);
0 0 if (!IoIFP(io2) && !IoOFP(io2)) PerlLIO_close(fd[1]);
2488 97 0 IO * const io = GvIOn(gv);
96 1 IO * const io = GvIOn(gv);
96 0 IO * const io = GvIOn(gv);
95 1 IO * const io = GvIOn(gv);
2492 96 0 if (!io || !IoIFP(io))
60 36 if (!io || !IoIFP(io))
2495 60 0 addr = SvPV_const(addrsv, len);
2496 0 60 TAINT_PROPER(PL_op_desc[op_type]);
2497 45 15 if ((op_type == OP_BIND
2500 28 32 >= 0)
2514 37 0 const int backlog = POPi;
2516 37 0 IO * const io = gv ? GvIOn(gv) : NULL;
37 0 IO * const io = gv ? GvIOn(gv) : NULL;
37 0 IO * const io = gv ? GvIOn(gv) : NULL;
37 0 IO * const io = gv ? GvIOn(gv) : NULL;
37 0 IO * const io = gv ? GvIOn(gv) : NULL;
2518 37 0 if (!io || !IoIFP(io))
21 16 if (!io || !IoIFP(io))
2521 21 0 if (PerlSock_listen(PerlIO_fileno(IoIFP(io)), backlog) >= 0)
2547 40 0 if (!ngv)
2549 40 0 if (!ggv)
2552 40 0 gstio = GvIO(ggv);
36 4 gstio = GvIO(ggv);
36 0 gstio = GvIO(ggv);
2553 32 8 if (!gstio || !IoIFP(gstio))
20 12 if (!gstio || !IoIFP(gstio))
2556 20 0 nstio = GvIOn(ngv);
20 0 nstio = GvIOn(ngv);
20 0 nstio = GvIOn(ngv);
20 0 nstio = GvIOn(ngv);
2569 20 0 if (fd < 0)
2571 0 20 if (IoIFP(nstio))
2576 20 0 if (!IoIFP(nstio) || !IoOFP(nstio)) {
0 20 if (!IoIFP(nstio) || !IoOFP(nstio)) {
2577 0 0 if (IoIFP(nstio)) PerlIO_close(IoIFP(nstio));
2578 0 0 if (IoOFP(nstio)) PerlIO_close(IoOFP(nstio));
2579 0 0 if (!IoIFP(nstio) && !IoOFP(nstio)) PerlLIO_close(fd);
0 0 if (!IoIFP(nstio) && !IoOFP(nstio)) PerlLIO_close(fd);
2590 0 20 PUSHp(namebuf, len);
2605 19 0 const int how = POPi;
2607 19 0 IO * const io = GvIOn(gv);
19 0 IO * const io = GvIOn(gv);
19 0 IO * const io = GvIOn(gv);
19 0 IO * const io = GvIOn(gv);
2609 19 0 if (!io || !IoIFP(io))
3 16 if (!io || !IoIFP(io))
2612 0 3 PUSHi( PerlSock_shutdown(PerlIO_fileno(IoIFP(io)), how) >= 0 );
2625 26 16 SV * const sv = (optype == OP_GSOCKOPT) ? sv_2mortal(newSV(257)) : POPs;
2626 42 0 const unsigned int optname = (unsigned int) POPi;
2627 42 0 const unsigned int lvl = (unsigned int) POPi;
2629 42 0 IO * const io = GvIOn(gv);
42 0 IO * const io = GvIOn(gv);
42 0 IO * const io = GvIOn(gv);
42 0 IO * const io = GvIOn(gv);
2633 42 0 if (!io || !IoIFP(io))
10 32 if (!io || !IoIFP(io))
2639 10 0 SvGROW(sv, 257);
0 10 SvGROW(sv, 257);
2644 10 0 if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0)
2667 0 0 if (SvPOKp(sv)) {
2669 0 0 buf = (SETSOCKOPT_OPTION_VALUE_T) SvPV_const(sv, l);
2673 0 0 aint = (int)SvIV(sv);
2677 0 0 if (PerlSock_setsockopt(fd, lvl, optname, buf, len) < 0)
2698 72 0 IO * const io = GvIOn(gv);
72 0 IO * const io = GvIOn(gv);
72 0 IO * const io = GvIOn(gv);
72 0 IO * const io = GvIOn(gv);
2703 72 0 if (!io || !IoIFP(io))
40 32 if (!io || !IoIFP(io))
2714 25 0 if (PerlSock_getsockname(fd, (struct sockaddr *)SvPVX(sv), &len) < 0)
2718 8 7 if (PerlSock_getpeername(fd, (struct sockaddr *)SvPVX(sv), &len) < 0)
2765 569 295699 if (PL_op->op_flags & OPf_REF ? (gv = cGVOP_gv, 1)
823 295445 if (PL_op->op_flags & OPf_REF ? (gv = cGVOP_gv, 1)
2766 8 295691 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
10 295689 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
0 10 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
253 295436 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
246 7 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
0 246 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
244 2 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
0 244 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
244 2 : !!(sv=POPs, gv = MAYBE_DEREF_GV(sv))) {
2767 19 804 if (PL_op->op_type == OP_LSTAT) {
2768 10 9 if (gv != PL_defgv) {
2770 10 2 Perl_ck_warner(aTHX_ packWARN(WARN_IO),
2 10 Perl_ck_warner(aTHX_ packWARN(WARN_IO),
2773 10 0 SVfARG(gv
2776 6 3 } else if (PL_laststype != OP_LSTAT)
2781 269 550 if (gv != PL_defgv) {
2786 7 267 PL_statgv = gv ? gv : (GV *)io;
2788 267 7 if(gv) {
2789 267 0 io = GvIO(gv);
267 0 io = GvIO(gv);
267 0 io = GvIO(gv);
2791 272 2 if (io) {
2792 263 9 if (IoIFP(io)) {
2796 2 7 } else if (IoDIRP(io)) {
2805 9 265 if (PL_laststatval < 0 && !havefp) report_evil_fh(gv);
9 0 if (PL_laststatval < 0 && !havefp) report_evil_fh(gv);
2808 17 807 if (PL_laststatval < 0) {
2813 9 295436 if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
7 2 if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) {
2815 2 5 if (PL_op->op_type == OP_LSTAT)
2820 1 295437 SvTAINTED_off(PL_statname); /* previous tainting irrelevant */
2821 295404 34 sv_setpv(PL_statname, SvPV_nomg_const_nolen(sv));
2824 276423 19015 if (PL_op->op_type == OP_LSTAT)
2825 276423 0 PL_laststatval = PerlLIO_lstat(SvPV_nolen_const(PL_statname), &PL_statcache);
2827 19015 0 PL_laststatval = PerlLIO_stat(SvPV_nolen_const(PL_statname), &PL_statcache);
2828 1957 293481 if (PL_laststatval < 0) {
2829 153 1804 if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname), '\n'))
153 0 if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname), '\n'))
3 150 if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname), '\n'))
2835 296239 23 gimme = GIMME_V;
2836 268 295994 if (gimme != G_ARRAY) {
2837 154 114 if (gimme != G_VOID)
2838 0 154 XPUSHs(boolSV(max));
13 141 XPUSHs(boolSV(max));
2841 294055 1939 if (max) {
0 294055 if (max) {
2843 0 294055 EXTEND_MORTAL(max);
2909 26132 349950 if (PL_op->op_flags & OPf_REF) XPUSHs(ret);
0 26132 if (PL_op->op_flags & OPf_REF) XPUSHs(ret);
2913 7 376075 if (PL_op->op_private & OPpFT_STACKING) {
2914 7 7 while (OP_IS_FILETEST(next->op_type)
2915 7 0 && next->op_private & OPpFT_STACKED)
2924 28410 378365 if (PL_op->op_flags & OPf_REF)
2925 0 28410 XPUSHs(PL_op->op_private & OPpFT_STACKING ? (SV *)cGVOP_gv : (ret));
2 28408 XPUSHs(PL_op->op_private & OPpFT_STACKING ? (SV *)cGVOP_gv : (ret));
2926 378267 98 else if (!(PL_op->op_private & OPpFT_STACKING))
2950 3458 61 if (!(PL_op->op_private & OPpFT_STACKING)) SvGETMAGIC(arg);
5 3453 if (!(PL_op->op_private & OPpFT_STACKING)) SvGETMAGIC(arg);
2952 3514 4 if (SvAMAGIC(arg))
1473 2041 if (SvAMAGIC(arg))
1426 47 if (SvAMAGIC(arg))
2959 1293 130 if (!tmpsv)
2962 0 0 return SvTRUE(tmpsv)
0 0 return SvTRUE(tmpsv)
0 0 return SvTRUE(tmpsv)
982 0 return SvTRUE(tmpsv)
820 162 return SvTRUE(tmpsv)
161 659 return SvTRUE(tmpsv)
0 161 return SvTRUE(tmpsv)
323 659 return SvTRUE(tmpsv)
175 136 return SvTRUE(tmpsv)
22 153 return SvTRUE(tmpsv)
136 22 return SvTRUE(tmpsv)
0 136 return SvTRUE(tmpsv)
289 22 return SvTRUE(tmpsv)
0 0 return SvTRUE(tmpsv)
2963 1293 0 ? S_ft_return_true(aTHX_ tmpsv) : S_ft_return_false(aTHX_ tmpsv);
0 1293 ? S_ft_return_true(aTHX_ tmpsv) : S_ft_return_false(aTHX_ tmpsv);
0 1293 ? S_ft_return_true(aTHX_ tmpsv) : S_ft_return_false(aTHX_ tmpsv);
982 311 ? S_ft_return_true(aTHX_ tmpsv) : S_ft_return_false(aTHX_ tmpsv);
311 0 ? S_ft_return_true(aTHX_ tmpsv) : S_ft_return_false(aTHX_ tmpsv);
2993 0 21973 switch (PL_op->op_type) {
3001 406 21567 tryAMAGICftest_MG(opchar);
388 18 tryAMAGICftest_MG(opchar);
27 360 tryAMAGICftest_MG(opchar);
3003 35 21577 switch (PL_op->op_type) {
3053 0 21612 if (use_access) {
3055 0 0 const char *name = SvPV_nolen(*PL_stack_sp);
3056 0 0 if (effective) {
3071 0 0 if (result == 0)
3073 0 0 if (result < 0)
3080 2818 18792 if (result < 0)
3082 12256 6536 if (cando(stat_mode, effective, &PL_statcache))
3094 0 327323 switch (op_type) {
3101 1970 325353 tryAMAGICftest_MG(opchar);
1964 6 tryAMAGICftest_MG(opchar);
1711 253 tryAMAGICftest_MG(opchar);
3104 27873 299197 if (result < 0)
3106 229230 69967 if (op_type == OP_FTIS)
3133 0 69967 SvSETMAGIC(TARG);
3134 0 0 return SvTRUE_nomg(TARG)
0 0 return SvTRUE_nomg(TARG)
0 0 return SvTRUE_nomg(TARG)
0 0 return SvTRUE_nomg(TARG)
0 0 return SvTRUE_nomg(TARG)
0 0 return SvTRUE_nomg(TARG)
0 0 return SvTRUE_nomg(TARG)
69437 530 return SvTRUE_nomg(TARG)
62680 6757 return SvTRUE_nomg(TARG)
530 62680 return SvTRUE_nomg(TARG)
92 438 return SvTRUE_nomg(TARG)
7195 62772 return SvTRUE_nomg(TARG)
0 0 return SvTRUE_nomg(TARG)
3135 69967 0 ? S_ft_return_true(aTHX_ TARG) : S_ft_return_false(aTHX_ TARG);
0 69967 ? S_ft_return_true(aTHX_ TARG) : S_ft_return_false(aTHX_ TARG);
0 69967 ? S_ft_return_true(aTHX_ TARG) : S_ft_return_false(aTHX_ TARG);
69967 0 ? S_ft_return_true(aTHX_ TARG) : S_ft_return_false(aTHX_ TARG);
3145 0 236667 switch (PL_op->op_type) {
3159 731 235936 tryAMAGICftest_MG(opchar);
689 42 tryAMAGICftest_MG(opchar);
75 614 tryAMAGICftest_MG(opchar);
3180 39132 196921 if (result < 0)
3184 29 0 if (PL_statcache.st_uid == PerlProc_getuid())
3188 30 0 if (PL_statcache.st_uid == PerlProc_geteuid())
3192 22 474 if (PL_statcache.st_size == 0)
3196 2 226 if (S_ISSOCK(PL_statcache.st_mode))
3200 155 80 if (S_ISCHR(PL_statcache.st_mode))
3204 31 196 if (S_ISBLK(PL_statcache.st_mode))
3208 85269 10129 if (S_ISREG(PL_statcache.st_mode))
3212 70612 28270 if (S_ISDIR(PL_statcache.st_mode))
3216 1 35 if (S_ISFIFO(PL_statcache.st_mode))
3221 1 491 if (PL_statcache.st_mode & S_ISUID)
3227 0 433 if (PL_statcache.st_mode & S_ISGID)
3233 2 433 if (PL_statcache.st_mode & S_ISVTX)
3246 60 194386 tryAMAGICftest_MG('l');
60 0 tryAMAGICftest_MG('l');
9 51 tryAMAGICftest_MG('l');
3249 22 194366 if (result < 0)
3251 28 194338 if (S_ISLNK(PL_statcache.st_mode))
3264 399 29 tryAMAGICftest_MG('t');
395 4 tryAMAGICftest_MG('t');
389 5 tryAMAGICftest_MG('t');
3266 24 398 if (PL_op->op_flags & OPf_REF)
3270 5 393 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
0 5 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
387 6 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
381 6 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
0 381 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
380 1 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
0 380 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
380 1 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
13 385 if (!(gv = MAYBE_DEREF_GV_nomg(tmpsv))) {
3271 5 8 name = SvPV_nomg(tmpsv, namelen);
3276 413 9 if (GvIO(gv) && IoIFP(GvIOp(gv)))
413 0 if (GvIO(gv) && IoIFP(GvIOp(gv)))
413 0 if (GvIO(gv) && IoIFP(GvIOp(gv)))
413 0 if (GvIO(gv) && IoIFP(GvIOp(gv)))
385 28 if (GvIO(gv) && IoIFP(GvIOp(gv)))
3278 13 24 else if (name && isDIGIT(*name))
1 12 else if (name && isDIGIT(*name))
3282 16 370 if (PerlLIO_isatty(fd))
3300 35 1999 tryAMAGICftest_MG(PL_op->op_type == OP_FTTEXT ? 'T' : 'B');
23 12 tryAMAGICftest_MG(PL_op->op_type == OP_FTTEXT ? 'T' : 'B');
10 13 tryAMAGICftest_MG(PL_op->op_type == OP_FTTEXT ? 'T' : 'B');
11 10 tryAMAGICftest_MG(PL_op->op_type == OP_FTTEXT ? 'T' : 'B');
3302 1142 880 if (PL_op->op_flags & OPf_REF)
3304 2 878 else if ((PL_op->op_private & (OPpFT_STACKED|OPpFT_AFTER_t))
3309 4 874 gv = MAYBE_DEREF_GV_nomg(sv);
0 4 gv = MAYBE_DEREF_GV_nomg(sv);
9 865 gv = MAYBE_DEREF_GV_nomg(sv);
3 6 gv = MAYBE_DEREF_GV_nomg(sv);
0 3 gv = MAYBE_DEREF_GV_nomg(sv);
3 0 gv = MAYBE_DEREF_GV_nomg(sv);
0 3 gv = MAYBE_DEREF_GV_nomg(sv);
3 0 gv = MAYBE_DEREF_GV_nomg(sv);
3312 1151 871 if (gv) {
3313 1125 26 if (gv == PL_defgv) {
3314 5 1120 if (PL_statgv)
3317 3 2 : GvIO(PL_statgv);
3 0 : GvIO(PL_statgv);
3 0 : GvIO(PL_statgv);
3 0 : GvIO(PL_statgv);
3325 26 0 io = GvIO(PL_statgv);
26 0 io = GvIO(PL_statgv);
26 0 io = GvIO(PL_statgv);
3329 31 0 if (io && IoIFP(io)) {
19 12 if (io && IoIFP(io)) {
3330 0 19 if (! PerlIO_has_base(IoIFP(io)))
3333 0 19 if (PL_laststatval < 0)
3335 0 19 if (S_ISDIR(PL_statcache.st_mode)) { /* handle NFS glitch */
3336 0 0 if (PL_op->op_type == OP_FTTEXT)
3341 10 9 if (PerlIO_get_cnt(IoIFP(io)) <= 0) {
3343 6 4 if (i != EOF)
3346 4 15 if (PerlIO_get_cnt(IoIFP(io)) <= 0) /* null file is anything */
3351 15 0 if (len > 512)
3362 863 8 sv_setpv(PL_statname, SvPV_nomg_const_nolen(sv));
3365 16 1975 if (!(fp = PerlIO_open(SvPVX_const(PL_statname), "r"))) {
3366 11 5 if (!gv) {
3370 2 14 if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname),
2 0 if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname),
1 1 if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname),
3377 0 1975 if (PL_laststatval < 0) {
3384 315 1660 if (len <= 0) {
3385 280 35 if (S_ISDIR(PL_statcache.st_mode) && PL_op->op_type == OP_FTTEXT)
279 1 if (S_ISDIR(PL_statcache.st_mode) && PL_op->op_type == OP_FTTEXT)
3401 451614 1651 for (i = 0; i < len; i++, s++) {
3402 24 451590 if (!*s) { /* null never allowed in text */
3410 28 451562 else if (*s & 128) {
3412 0 28 if (IN_LOCALE_RUNTIME && isALPHA_LC(*s))
0 0 if (IN_LOCALE_RUNTIME && isALPHA_LC(*s))
3416 28 0 if (UTF8_IS_START(*s)) {
3418 28 0 if (ulen < len - i) {
3420 28 28 for (j = 1; j < ulen; j++) {
3421 28 0 if (!UTF8_IS_CONTINUATION(s[j]))
3433 15831 435731 else if (*s < 32 &&
3434 15757 74 *s != '\n' && *s != '\r' && *s != '\b' &&
15757 0 *s != '\n' && *s != '\r' && *s != '\b' &&
66 15691 *s != '\n' && *s != '\r' && *s != '\b' &&
3435 66 0 *s != '\t' && *s != '\f' && *s != 27)
66 0 *s != '\t' && *s != '\f' && *s != 27)
3440 431 1244 if ((odd * 3 > len) == (PL_op->op_type == OP_FTTEXT)) /* allow 1/3 odd */
3454 39052 4 if( MAXARG == 1 ) {
3456 8 39044 if (PL_op->op_flags & OPf_SPECIAL) {
3459 7 39037 else if (!(gv = MAYBE_DEREF_GV(sv)))
0 39044 else if (!(gv = MAYBE_DEREF_GV(sv)))
0 0 else if (!(gv = MAYBE_DEREF_GV(sv)))
15 39029 else if (!(gv = MAYBE_DEREF_GV(sv)))
7 8 else if (!(gv = MAYBE_DEREF_GV(sv)))
0 7 else if (!(gv = MAYBE_DEREF_GV(sv)))
6 1 else if (!(gv = MAYBE_DEREF_GV(sv)))
0 6 else if (!(gv = MAYBE_DEREF_GV(sv)))
6 1 else if (!(gv = MAYBE_DEREF_GV(sv)))
39038 6 else if (!(gv = MAYBE_DEREF_GV(sv)))
3460 39020 18 tmps = SvPV_nomg_const_nolen(sv);
3463 39042 14 if( !gv && (!tmps || !*tmps) ) {
39038 4 if( !gv && (!tmps || !*tmps) ) {
4 39034 if( !gv && (!tmps || !*tmps) ) {
3464 8 0 HV * const table = GvHVn(PL_envgv);
3467 5 3 if ( (svp = hv_fetchs(table, "HOME", FALSE))
3468 3 2 || (svp = hv_fetchs(table, "LOGDIR", FALSE))
3474 4 2 if( MAXARG == 1 )
3476 6 0 tmps = SvPV_nolen_const(*svp);
3479 0 2 PUSHi(0);
3480 0 2 TAINT_PROPER("chdir");
3485 72 38982 TAINT_PROPER("chdir");
3486 14 39039 if (gv) {
3488 14 0 IO* const io = GvIO(gv);
14 0 IO* const io = GvIO(gv);
14 0 IO* const io = GvIO(gv);
3489 14 0 if (io) {
3490 3 11 if (IoDIRP(io)) {
3491 0 3 PUSHi(fchdir(my_dirfd(IoDIRP(io))) >= 0);
3492 3 8 } else if (IoIFP(io)) {
3493 0 3 PUSHi(fchdir(PerlIO_fileno(IoIFP(io))) >= 0);
3498 0 8 PUSHi(0);
3504 0 0 PUSHi(0);
3511 6 39033 PUSHi( PerlDir_chdir(tmps) >= 0 );
3526 0 93392 XPUSHi(value);
0 93392 XPUSHi(value);
3534 0 0 char * const tmps = POPpx;
3535 0 0 TAINT_PROPER("chroot");
3536 0 0 PUSHi( chroot(tmps) >= 0 );
3547 157255 0 const char * const tmps2 = POPpconstx;
3548 157255 0 const char * const tmps = SvPV_nolen_const(TOPs);
3549 0 157255 TAINT_PROPER("rename");
3564 0 157255 SETi( anum >= 0 );
3585 62 0 const char * const tmps2 = POPpconstx;
3586 62 0 const char * const tmps = SvPV_nolen_const(TOPs);
3587 0 62 TAINT_PROPER(PL_op_desc[op_type]);
3593 43 19 PerlLIO_link(tmps, tmps2) : symlink(tmps, tmps2);
3606 0 62 SETi( result >= 0 );
3630 45 2 tmps = POPpconstx;
3632 26 21 if (len < 0)
3634 0 21 PUSHp(buf, len);
3753 2847 9859 const int mode = (MAXARG > 1 && (TOPs||((void)POPs,0))) ? POPi : 0777;
1 2846 const int mode = (MAXARG > 1 && (TOPs||((void)POPs,0))) ? POPi : 0777;
2846 0 const int mode = (MAXARG > 1 && (TOPs||((void)POPs,0))) ? POPi : 0777;
3755 12706 0 TRIMSLASHES(tmps,len,copy);
12697 9 TRIMSLASHES(tmps,len,copy);
72 12625 TRIMSLASHES(tmps,len,copy);
74 0 TRIMSLASHES(tmps,len,copy);
2 72 TRIMSLASHES(tmps,len,copy);
3757 65 12641 TAINT_PROPER("mkdir");
3759 0 12706 SETi( PerlDir_mkdir(tmps, mode) >= 0 );
3769 72 12634 if (copy)
3781 1556 0 TRIMSLASHES(tmps,len,copy);
1453 103 TRIMSLASHES(tmps,len,copy);
1 1452 TRIMSLASHES(tmps,len,copy);
3 0 TRIMSLASHES(tmps,len,copy);
2 1 TRIMSLASHES(tmps,len,copy);
3782 0 1556 TAINT_PROPER("rmdir");
3784 0 1556 SETi( PerlDir_rmdir(tmps) >= 0 );
3788 1 1555 if (copy)
3799 35270 0 const char * const dirname = POPpconstx;
3801 35270 0 IO * const io = GvIOn(gv);
35270 0 IO * const io = GvIOn(gv);
35270 0 IO * const io = GvIOn(gv);
20765 14505 IO * const io = GvIOn(gv);
3803 35270 0 if (!io)
3806 35262 8 if ((IoIFP(io) || IoOFP(io)))
0 35262 if ((IoIFP(io) || IoOFP(io)))
3809 8 0 HEKfARG(GvENAME_HEK(gv)) );
3810 32 35238 if (IoDIRP(io))
3812 35265 5 if (!(IoDIRP(io) = PerlDir_open(dirname)))
3817 0 5 if (!errno)
3837 262495 433 const I32 gimme = GIMME;
235365 27130 const I32 gimme = GIMME;
3840 262928 0 IO * const io = GvIOn(gv);
262928 0 IO * const io = GvIOn(gv);
262928 0 IO * const io = GvIOn(gv);
262927 1 IO * const io = GvIOn(gv);
3842 262928 0 if (!io || !IoDIRP(io)) {
7 262921 if (!io || !IoDIRP(io)) {
3845 7 0 HEKfARG(GvENAME_HEK(gv)));
3851 1484249 27654 if (!dp)
3859 1484249 0 if (!(IoFLAGS(io) & IOf_UNTAINT))
3860 31269 1452980 SvTAINTED_on(sv);
3862 3 1484246 mXPUSHs(sv);
3863 1248982 235267 } while (gimme == G_ARRAY);
3865 262802 119 if (!dp && gimme != G_ARRAY)
3871 10 116 if (!errno)
3873 123 3 if (GIMME == G_ARRAY)
1 125 if (GIMME == G_ARRAY)
3892 6 0 IO * const io = GvIOn(gv);
6 0 IO * const io = GvIOn(gv);
6 0 IO * const io = GvIOn(gv);
5 1 IO * const io = GvIOn(gv);
3894 6 0 if (!io || !IoDIRP(io)) {
6 0 if (!io || !IoDIRP(io)) {
3897 6 0 HEKfARG(GvENAME_HEK(gv)));
3901 0 0 PUSHi( PerlDir_tell(IoDIRP(io)) );
3904 1 5 if (!errno)
3916 4 0 const long along = POPl;
3918 4 0 IO * const io = GvIOn(gv);
4 0 IO * const io = GvIOn(gv);
4 0 IO * const io = GvIOn(gv);
4 0 IO * const io = GvIOn(gv);
3920 4 0 if (!io || !IoDIRP(io)) {
4 0 if (!io || !IoDIRP(io)) {
3923 4 0 HEKfARG(GvENAME_HEK(gv)));
3930 0 4 if (!errno)
3943 15 0 IO * const io = GvIOn(gv);
15 0 IO * const io = GvIOn(gv);
15 0 IO * const io = GvIOn(gv);
15 0 IO * const io = GvIOn(gv);
3945 15 0 if (!io || !IoDIRP(io)) {
6 9 if (!io || !IoDIRP(io)) {
3948 6 0 HEKfARG(GvENAME_HEK(gv)));
3954 2 4 if (!errno)
3967 33352 0 IO * const io = GvIOn(gv);
33352 0 IO * const io = GvIOn(gv);
33352 0 IO * const io = GvIOn(gv);
33352 0 IO * const io = GvIOn(gv);
3969 33352 0 if (!io || !IoDIRP(io)) {
380 32972 if (!io || !IoDIRP(io)) {
3972 380 0 HEKfARG(GvENAME_HEK(gv)));
3978 0 32972 if (PerlDir_close(IoDIRP(io)) < 0) {
3987 374 6 if (!errno)
3998 0 688 {
4013 71 617 if (childpid == 0) {
4016 27 44 if (PL_psig_pend)
4017 1836 27 for (sig = 1; sig < SIG_SIZE; sig++)
4027 1 687 if (childpid < 0)
4034 0 687 PUSHi(childpid);
4061 93 0 if (PL_signals & PERL_SIGNALS_UNSAFE_FLAG)
4066 0 0 PERL_ASYNC_CHECK();
4073 90 3 STATUS_NATIVE_CHILD_SET((childpid > 0) ? argflags : -1);
3 90 STATUS_NATIVE_CHILD_SET((childpid > 0) ? argflags : -1);
69 21 STATUS_NATIVE_CHILD_SET((childpid > 0) ? argflags : -1);
21 69 STATUS_NATIVE_CHILD_SET((childpid > 0) ? argflags : -1);
21 69 STATUS_NATIVE_CHILD_SET((childpid > 0) ? argflags : -1);
21 0 STATUS_NATIVE_CHILD_SET((childpid > 0) ? argflags : -1);
4075 0 93 XPUSHi(childpid);
0 93 XPUSHi(childpid);
4086 874 0 const int optype = POPi;
4087 874 0 const Pid_t pid = TOPi;
4091 874 0 if (PL_signals & PERL_SIGNALS_UNSAFE_FLAG)
4096 0 0 PERL_ASYNC_CHECK();
4103 455 419 STATUS_NATIVE_CHILD_SET((result > 0) ? argflags : -1);
419 455 STATUS_NATIVE_CHILD_SET((result > 0) ? argflags : -1);
455 0 STATUS_NATIVE_CHILD_SET((result > 0) ? argflags : -1);
0 455 STATUS_NATIVE_CHILD_SET((result > 0) ? argflags : -1);
0 455 STATUS_NATIVE_CHILD_SET((result > 0) ? argflags : -1);
0 0 STATUS_NATIVE_CHILD_SET((result > 0) ? argflags : -1);
4105 0 874 SETi(result);
4123 0 1723 if (TAINTING_get) {
4124 0 0 TAINT_ENV();
4125 0 0 while (++MARK <= SP) {
4126 0 0 (void)SvPV_nolen_const(*MARK); /* stringify for taint check */
4127 0 0 if (TAINT_get)
4131 0 0 TAINT_PROPER("system");
4143 1723 0 if (PerlProc_pipe(pp) >= 0)
4150 0 1723 while ((childpid = PerlProc_fork()) == -1) {
4151 0 0 if (errno != EAGAIN) {
4154 0 0 XPUSHi(value);
0 0 XPUSHi(value);
4155 0 0 if (did_pipes) {
4166 1723 0 if (childpid > 0) {
4170 1723 0 if (did_pipes)
4178 0 1722 } while (result == -1 && errno == EINTR);
0 0 } while (result == -1 && errno == EINTR);
4186 1722 0 STATUS_NATIVE_CHILD_SET(result == -1 ? -1 : status);
0 1722 STATUS_NATIVE_CHILD_SET(result == -1 ? -1 : status);
1721 1 STATUS_NATIVE_CHILD_SET(result == -1 ? -1 : status);
1 1721 STATUS_NATIVE_CHILD_SET(result == -1 ? -1 : status);
1 1721 STATUS_NATIVE_CHILD_SET(result == -1 ? -1 : status);
1 0 STATUS_NATIVE_CHILD_SET(result == -1 ? -1 : status);
4189 1722 0 if (did_pipes) {
4194 1722 4 while (n < sizeof(int)) {
4198 4 1718 if (n1 <= 0)
4203 4 1718 if (n) { /* Error */
4204 0 4 if (n != sizeof(int))
4207 4 0 STATUS_NATIVE_CHILD_SET(-1);
0 0 STATUS_NATIVE_CHILD_SET(-1);
0 0 STATUS_NATIVE_CHILD_SET(-1);
0 0 STATUS_NATIVE_CHILD_SET(-1);
0 0 STATUS_NATIVE_CHILD_SET(-1);
4210 0 1722 XPUSHi(STATUS_CURRENT);
0 1722 XPUSHi(STATUS_CURRENT);
4216 0 0 if (did_pipes) {
4222 0 0 if (PL_op->op_flags & OPf_STACKED) {
4226 0 0 else if (SP - MARK != 1)
4229 0 0 value = (I32)do_exec3(SvPVx_nolen(sv_mortalcopy(*SP)), pp[1], did_pipes);
4270 0 5 if (TAINTING_get) {
4271 0 0 TAINT_ENV();
4272 0 0 while (++MARK <= SP) {
4273 0 0 (void)SvPV_nolen_const(*MARK); /* stringify for taint check */
4274 0 0 if (TAINT_get)
4278 0 0 TAINT_PROPER("exec");
4281 0 5 if (PL_op->op_flags & OPf_STACKED) {
4285 5 0 else if (SP - MARK != 1)
4295 0 0 value = (I32)do_exec(SvPVx_nolen(sv_mortalcopy(*SP)));
4300 0 5 XPUSHi(value);
0 5 XPUSHi(value);
4308 0 8 XPUSHi( getppid() );
0 8 XPUSHi( getppid() );
4320 1 6 const Pid_t pid =
0 1 const Pid_t pid =
4321 0 0 (MAXARG < 1) ? 0 : TOPs ? SvIVx(POPs) : ((void)POPs, 0);
4330 0 7 XPUSHi(pgrp);
0 7 XPUSHi(pgrp);
4343 2 2 pgrp = MAXARG == 2 && (TOPs||POPs) ? POPi : 0;
2 0 pgrp = MAXARG == 2 && (TOPs||POPs) ? POPi : 0;
0 2 pgrp = MAXARG == 2 && (TOPs||POPs) ? POPi : 0;
0 0 pgrp = MAXARG == 2 && (TOPs||POPs) ? POPi : 0;
4344 3 1 if (MAXARG > 0) pid = TOPs && TOPi;
2 1 if (MAXARG > 0) pid = TOPs && TOPi;
2 0 if (MAXARG > 0) pid = TOPs && TOPi;
0 2 if (MAXARG > 0) pid = TOPs && TOPi;
0 0 if (MAXARG > 0) pid = TOPs && TOPi;
4347 0 1 XPUSHi(-1);
0 1 XPUSHi(-1);
4350 0 4 TAINT_PROPER("setpgrp");
4352 0 4 SETi( BSD_SETPGRP(pid, pgrp) >= 0 );
4377 2 2 const int who = POPi;
4378 2 2 const int which = TOPi;
4379 0 4 SETi( getpriority(PRIORITY_WHICH_T(which), who) );
4390 0 0 const int niceval = POPi;
4391 0 0 const int who = POPi;
4392 0 0 const int which = TOPi;
4393 0 0 TAINT_PROPER("setpriority");
4394 0 0 SETi( setpriority(PRIORITY_WHICH_T(which), who, niceval) >= 0 );
4411 0 3210912 XPUSHi( time(NULL) );
0 3210912 XPUSHi( time(NULL) );
4417 0 237728 {
4431 237726 2 if (GIMME == G_ARRAY) {
237719 9 if (GIMME == G_ARRAY) {
4470 307 1187 const char *opname = PL_op->op_type == OP_LOCALTIME ? "localtime" : "gmtime";
4477 1346 148 if (MAXARG < 1 || (!TOPs && ((void)POPs, 1))) {
2 1344 if (MAXARG < 1 || (!TOPs && ((void)POPs, 1))) {
4483 111 1233 NV input = Perl_floor(POPn);
4485 0 1344 if (when != input) {
4492 4 1490 if ( TIME_LOWER_BOUND > when ) {
4498 6 1484 else if( when > TIME_UPPER_BOUND ) {
4505 1182 302 if (PL_op->op_type == OP_LOCALTIME)
4511 10 1484 if (err == NULL) {
4517 1486 8 if (GIMME != G_ARRAY) { /* scalar context */
371 1123 if (GIMME != G_ARRAY) { /* scalar context */
0 371 if (GIMME != G_ARRAY) { /* scalar context */
0 1123 if (GIMME != G_ARRAY) { /* scalar context */
4523 0 371 EXTEND_MORTAL(1);
4524 10 361 if (err == NULL)
4538 0 1123 if ( err == NULL )
4542 0 1123 EXTEND_MORTAL(9);
4561 762 0 anum = POPi;
4563 0 762 if (anum < 0)
4565 0 762 PUSHi(anum);
4580 99 0 if (MAXARG < 1 || (!TOPs && !POPs))
0 99 if (MAXARG < 1 || (!TOPs && !POPs))
0 0 if (MAXARG < 1 || (!TOPs && !POPs))
4583 99 0 duration = POPi;
4587 0 99 XPUSHi(when - lasttime);
0 99 XPUSHi(when - lasttime);
4617 0 20 PUSHi(value);
4632 0 7 if (anum == -1)
4634 0 7 PUSHi(anum);
4647 0 25 if (anum == -1)
4649 0 25 if (anum != 0) {
4650 0 0 PUSHi(anum);
4653 0 25 PUSHp(zero_but_true, ZBTLEN);
4670 93 0 if (array && *array) {
19 74 if (array && *array) {
4674 0 19 if (!*++array)
4687 0 15 {
4702 11 4 if (which == OP_GHBYNAME) {
4704 11 0 const char* const name = POPpbytex;
4710 4 0 else if (which == OP_GHBYADDR) {
4712 4 0 const int addrtype = POPi;
4715 3 1 const char *addr = (char *)SvPVbyte(addrsv, addrlen);
4730 7 7 if (!hent) {
4736 7 0 STATUS_UNIX_SET(h_errno);
4740 14 0 if (GIMME != G_ARRAY) {
4 10 if (GIMME != G_ARRAY) {
4742 3 1 if (hent) {
4743 1 2 if (which == OP_GHBYNAME) {
4744 1 0 if (hent->h_addr)
4753 4 6 if (hent) {
4760 8 0 for (elem = hent->h_addr_list; elem && *elem; elem++) {
4 4 for (elem = hent->h_addr_list; elem && *elem; elem++) {
4761 0 4 mXPUSHp(*elem, len);
4777 0 2 {
4789 2 0 if (which == OP_GNBYNAME){
4791 2 0 const char * const name = POPpbytex;
4797 0 0 else if (which == OP_GNBYADDR) {
4799 0 0 const int addrtype = POPi;
4800 0 0 const Netdb_net_t addr = (Netdb_net_t) (U32)POPu;
4814 2 0 if (!nent) {
4820 2 0 STATUS_UNIX_SET(h_errno);
4825 2 0 if (GIMME != G_ARRAY) {
0 2 if (GIMME != G_ARRAY) {
4827 0 0 if (nent) {
4828 0 0 if (which == OP_GNBYNAME)
4836 0 2 if (nent) {
4850 0 13 {
4862 13 0 if (which == OP_GPBYNAME) {
4864 13 0 const char* const name = POPpbytex;
4870 0 0 else if (which == OP_GPBYNUMBER) {
4872 0 0 const int number = POPi;
4886 13 0 if (GIMME != G_ARRAY) {
0 13 if (GIMME != G_ARRAY) {
4888 0 0 if (pent) {
4889 0 0 if (which == OP_GPBYNAME)
4897 13 0 if (pent) {
4910 0 20 {
4922 19 1 if (which == OP_GSBYNAME) {
4924 19 0 const char * const proto = POPpbytex;
4925 19 0 const char * const name = POPpbytex;
4926 19 0 sent = PerlSock_getservbyname(name, (proto && !*proto) ? NULL : proto);
19 0 sent = PerlSock_getservbyname(name, (proto && !*proto) ? NULL : proto);
4931 1 0 else if (which == OP_GSBYPORT) {
4933 1 0 const char * const proto = POPpbytex;
4934 0 1 unsigned short port = (unsigned short)POPu;
4935 0 1 port = PerlSock_htons(port);
4936 1 0 sent = PerlSock_getservbyport(port, (proto && !*proto) ? NULL : proto);
1 0 sent = PerlSock_getservbyport(port, (proto && !*proto) ? NULL : proto);
4949 20 0 if (GIMME != G_ARRAY) {
7 13 if (GIMME != G_ARRAY) {
4951 7 0 if (sent) {
4952 6 1 if (which == OP_GSBYNAME) {
4953 0 6 sv_setiv(sv, (IV)PerlSock_ntohs(sent->s_port));
4961 13 0 if (sent) {
4964 0 13 mPUSHi(PerlSock_ntohs(sent->s_port));
4977 0 0 const int stayopen = TOPi;
5012 0 13 {
5077 0 308 {
5152 5 5 const char* const name = POPpbytex;
5158 204 44 Uid_t uid = POPi;
5175 300 8 if (GIMME != G_ARRAY) {
234 74 if (GIMME != G_ARRAY) {
5177 229 5 if (pwent) {
5178 0 229 if (which == OP_GPWNAM)
5186 72 2 if (pwent) {
5218 0 72 if (spwent && spwent->sp_pwdp)
0 0 if (spwent && spwent->sp_pwdp)
5223 72 0 if (!SvPOK(sv)) /* Use the standard password, then. */
5230 0 72 SvTAINTED_on(sv);
5276 0 72 SvTAINTED_on(sv);
5284 0 72 SvTAINTED_on(sv);
5298 0 291 {
5304 4 287 if (which == OP_GGRNAM) {
5305 2 2 const char* const name = POPpbytex;
5308 237 50 else if (which == OP_GGRGID) {
5309 203 34 const Gid_t gid = POPi;
5320 289 2 if (GIMME != G_ARRAY) {
228 63 if (GIMME != G_ARRAY) {
5324 226 2 if (grent) {
5325 0 226 if (which == OP_GGRNAM)
5333 63 0 if (grent) {
5364 0 4 {
5369 4 0 if (!(tmps = PerlProc_getlogin()))
5390 0 0 if (TAINTING_get) {
5391 0 0 while (++MARK <= SP) {
5392 0 0 if (SvTAINTED(*MARK)) {
0 0 if (SvTAINTED(*MARK)) {
5398 0 0 TAINT_PROPER("syscall");
5405 0 0 while (++MARK <= SP) {
5406 0 0 if (SvNIOK(*MARK) || !i)
5407 0 0 a[i++] = SvIV(*MARK);
5408 0 0 else if (*MARK == &PL_sv_undef)
5411 0 0 a[i++] = (unsigned long)SvPV_force_nolen(*MARK);
5412 0 0 if (i > 15)
5446 0 0 PUSHi(retval);