#define CALL_RPEEP(o) PL_rpeepp(aTHX_ o)
#define CALL_OPFREEHOOK(o) if (PL_opfreehook) PL_opfreehook(aTHX_ o)
-static char array_passed_to_stat[] = "Array passed to stat will be coerced to a scalar";
+static const char array_passed_to_stat[] = "Array passed to stat will be coerced to a scalar";
/* Used to avoid recursion through the op tree in scalarvoid() and
op_free()
}
else {
/* diag_listed_as: Array passed to stat will be coerced to a scalar%s */
- Perl_warner(aTHX_ packWARN(WARN_SYNTAX), array_passed_to_stat);
+ Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "%s", array_passed_to_stat);
}
}
scalar((OP *) kid);
s = SvPVX(sv);
len = SvCUR(sv);
end = s + len;
+ /* treat ::foo::bar as foo::bar */
+ if (len >= 2 && s[0] == ':' && s[1] == ':')
+ DIE(aTHX_ "Bareword in require must not start with a double-colon: \"%s\"\n", s);
+ if (s == end)
+ DIE(aTHX_ "Bareword in require maps to empty filename");
+
for (; s < end; s++) {
if (*s == ':' && s[1] == ':') {
*s = '/';