char *vile;
I32 warn;
char *func =
- op == OP_READLINE ? "readline" :
- op == OP_LEAVEWRITE ? "write" :
+ op == OP_READLINE ? "readline" : /* "<HANDLE>" not nice */
+ op == OP_LEAVEWRITE ? "write" : /* "write exit" not nice */
PL_op_desc[op];
char *pars = OP_IS_FILETEST(op) ? "" : "()";
char *type = OP_IS_SOCKET(op) || (io && IoTYPE(io) == IoTYPE_SOCKET) ?
"socket" : "filehandle";
char *name = NULL;
- if (isGV(gv)) {
- SV *sv = sv_newmortal();
- gv_efullname4(sv, gv, Nullch, FALSE);
- name = SvPVX(sv);
- }
-
if (io && IoTYPE(io) == IoTYPE_CLOSED) {
vile = "closed";
warn = WARN_CLOSED;
warn = WARN_UNOPENED;
}
+ if (gv && isGV(gv)) {
+ SV *sv = sv_newmortal();
+ gv_efullname4(sv, gv, Nullch, FALSE);
+ name = SvPVX(sv);
+ }
+
if (name && *name) {
Perl_warner(aTHX_ warn,
"%s%s on %s %s %s", func, pars, vile, type, name);