sR |I32 |dopoptowhen |I32 startingblock
s |void |save_lines |NULLOK AV *array|NN SV *sv
s |bool |doeval |int gimme|NULLOK OP** startop|NULLOK CV* outside|U32 seq
-sR |PerlIO *|check_type_and_open|NN const char *name|NN const char *mode
-sR |PerlIO *|doopen_pm |NN const char *name|NN const char *mode
+sR |PerlIO *|check_type_and_open|NN const char *name
+sR |PerlIO *|doopen_pm |NN const char *name|const STRLEN namelen
sRn |bool |path_is_absolute|NN const char *name
sR |I32 |run_user_filter|int idx|NN SV *buf_sv|int maxlen
sR |PMOP* |make_matcher |NN regexp* re
#define dopoptowhen(a) S_dopoptowhen(aTHX_ a)
#define save_lines(a,b) S_save_lines(aTHX_ a,b)
#define doeval(a,b,c,d) S_doeval(aTHX_ a,b,c,d)
-#define check_type_and_open(a,b) S_check_type_and_open(aTHX_ a,b)
+#define check_type_and_open(a) S_check_type_and_open(aTHX_ a)
#define doopen_pm(a,b) S_doopen_pm(aTHX_ a,b)
#define path_is_absolute S_path_is_absolute
#define run_user_filter(a,b,c) S_run_user_filter(aTHX_ a,b,c)
}
STATIC PerlIO *
-S_check_type_and_open(pTHX_ const char *name, const char *mode)
+S_check_type_and_open(pTHX_ const char *name)
{
Stat_t st;
const int st_rc = PerlLIO_stat(name, &st);
return NULL;
}
- return PerlIO_open(name, mode);
+ return PerlIO_open(name, PERL_SCRIPT_MODE);
}
STATIC PerlIO *
-S_doopen_pm(pTHX_ const char *name, const char *mode)
+S_doopen_pm(pTHX_ const char *name, const STRLEN namelen)
{
#ifndef PERL_DISABLE_PMC
- const STRLEN namelen = strlen(name);
PerlIO *fp;
if (namelen > 3 && strEQ(name + namelen - 3, ".pm")) {
pmc[namelen + 1] = '\0';
if (PerlLIO_stat(pmc, &pmcstat) < 0) {
- fp = check_type_and_open(name, mode);
+ fp = check_type_and_open(name);
}
else {
- fp = check_type_and_open(pmc, mode);
+ fp = check_type_and_open(pmc);
}
SvREFCNT_dec(pmcsv);
}
else {
- fp = check_type_and_open(name, mode);
+ fp = check_type_and_open(name);
}
return fp;
#else
- return check_type_and_open(name, mode);
+ return check_type_and_open(name);
#endif /* !PERL_DISABLE_PMC */
}
if (path_is_absolute(name)) {
tryname = name;
- tryrsfp = doopen_pm(name,PERL_SCRIPT_MODE);
+ tryrsfp = doopen_pm(name, len);
}
#ifdef MACOS_TRADITIONAL
if (!tryrsfp) {
MacPerl_CanonDir(name, newname, 1);
if (path_is_absolute(newname)) {
tryname = newname;
- tryrsfp = doopen_pm(newname,PERL_SCRIPT_MODE);
+ tryrsfp = doopen_pm(newname, strlen(newname));
}
}
#endif
#endif
TAINT_PROPER("require");
tryname = SvPVX_const(namesv);
- tryrsfp = doopen_pm(tryname, PERL_SCRIPT_MODE);
+ tryrsfp = doopen_pm(tryname, SvCUR(namesv));
if (tryrsfp) {
if (tryname[0] == '.' && tryname[1] == '/')
tryname += 2;
__attribute__nonnull__(pTHX_2);
STATIC bool S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq);
-STATIC PerlIO * S_check_type_and_open(pTHX_ const char *name, const char *mode)
+STATIC PerlIO * S_check_type_and_open(pTHX_ const char *name)
__attribute__warn_unused_result__
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2);
+ __attribute__nonnull__(pTHX_1);
-STATIC PerlIO * S_doopen_pm(pTHX_ const char *name, const char *mode)
+STATIC PerlIO * S_doopen_pm(pTHX_ const char *name, const STRLEN namelen)
__attribute__warn_unused_result__
- __attribute__nonnull__(pTHX_1)
- __attribute__nonnull__(pTHX_2);
+ __attribute__nonnull__(pTHX_1);
STATIC bool S_path_is_absolute(const char *name)
__attribute__warn_unused_result__