/* UNIVERSAL methods should be callable without a stash */
if (!stash) {
level = -1; /* probably appropriate */
- if(!(stash = gv_stashpvn("UNIVERSAL", 9, FALSE)))
+ if(!(stash = gv_stashpvn(STR_WITH_LEN("UNIVERSAL"), FALSE)))
return 0;
}
/* if at top level, try UNIVERSAL */
if (level == 0 || level == -1) {
- HV* const lastchance = gv_stashpvn("UNIVERSAL", 9, FALSE);
+ HV* const lastchance = gv_stashpvn(STR_WITH_LEN("UNIVERSAL"), FALSE);
if (lastchance) {
if ((gv = gv_fetchmeth(lastchance, name, len,
S_require_errno(pTHX_ GV *gv)
{
dVAR;
- HV* stash = gv_stashpvn("Errno",5,FALSE);
+ HV* stash = gv_stashpvn(STR_WITH_LEN("Errno"), FALSE);
if (!stash || !(gv_fetchmethod(stash, "TIEHASH"))) {
dSP;
newSVpvs("Errno"), Nullsv);
LEAVE;
SPAGAIN;
- stash = gv_stashpvn("Errno",5,FALSE);
+ stash = gv_stashpvn(STR_WITH_LEN("Errno"), FALSE);
if (!stash || !(gv_fetchmethod(stash, "TIEHASH")))
Perl_croak(aTHX_ "Can't use %%! because Errno.pm is not available");
}
Safefree(PL_inplace);
#if defined(__CYGWIN__) /* do backup extension automagically */
if (*(s+1) == '\0') {
- PL_inplace = savepv(".bak");
+ PL_inplace = savepvn(STR_WITH_LEN(".bak"));
return s+1;
}
#endif /* __CYGWIN__ */
PL_suidscript = -1;
if (PL_e_script) {
- PL_origfilename = savepvn("-e", 2);
+ PL_origfilename = savepvn(STR_WITH_LEN("-e"));
}
else {
/* if find_script() returns, it returns a malloc()-ed value */
SV *
PerlIO_tab_sv(pTHX_ PerlIO_funcs *tab)
{
- HV * const stash = gv_stashpvn("PerlIO::Layer", 13, TRUE);
+ HV * const stash = gv_stashpvn(STR_WITH_LEN("PerlIO::Layer"), TRUE);
SV * const sv = sv_bless(newRV_noinc(newSViv(PTR2IV(tab))), stash);
return sv;
}
!gv_fetchpv("top", 0, SVt_PVFM))
IoTOP_NAME(io) = savesvpv(topname);
else
- IoTOP_NAME(io) = savepvn("top", 3);
+ IoTOP_NAME(io) = savepvn(STR_WITH_LEN("top"));
}
topgv = gv_fetchpv(IoTOP_NAME(io), 0, SVt_PVFM);
if (!topgv || !GvFORM(topgv)) {