/* util.c
*
- * Copyright (c) 1991-2003, Larry Wall
+ * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ * 2000, 2001, 2002, 2003, by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
}
/* if STDERR is tied, use it instead */
- if (PL_stderrgv && (io = GvIOp(PL_stderrgv))
+ if (PL_stderrgv && SvREFCNT(PL_stderrgv) && (io = GvIO(PL_stderrgv))
&& (mg = SvTIED_mg((SV*)io, PERL_MAGIC_tiedscalar))) {
dSP; ENTER;
PUSHMARK(SP);
}
#ifdef EBCDIC
if (rev > 0x7FFFFFFF)
- Perl_croak(aTHX "In EBCDIC the v-string components cannot exceed 2147483647");
+ Perl_croak(aTHX_ "In EBCDIC the v-string components cannot exceed 2147483647");
#endif
/* Append native character for the rev point */
tmpend = uvchr_to_utf8(tmpbuf, rev);
if (isDIGIT(*p)) {
opt = (U32) atoi(p);
while (isDIGIT(*p)) p++;
- if (*p)
+ if (*p && *p != '\n' && *p != '\r')
Perl_croak(aTHX_ "Unknown Unicode option letter '%c'", *p);
}
else {
case PERL_UNICODE_ARGV:
opt |= PERL_UNICODE_ARGV_FLAG; break;
default:
- Perl_croak(aTHX_
- "Unknown Unicode option letter '%c'", *p);
+ if (*p != '\n' && *p != '\r')
+ Perl_croak(aTHX_
+ "Unknown Unicode option letter '%c'", *p);
}
}
}