summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index f5454ec3ed..48876909f9 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2378,7 +2378,7 @@ PP(pp_require)
)
{
tryname = name;
- tryrsfp = PerlIO_open(name,"r");
+ tryrsfp = PerlIO_open(name,PERL_SCRIPT_MODE);
}
else {
AV *ar = GvAVn(incgv);
@@ -2401,7 +2401,7 @@ PP(pp_require)
sv_setpvf(namesv, "%s/%s", dir, name);
#endif
tryname = SvPVX(namesv);
- tryrsfp = PerlIO_open(tryname, "r");
+ tryrsfp = PerlIO_open(tryname, PERL_SCRIPT_MODE);
if (tryrsfp) {
if (tryname[0] == '.' && tryname[1] == '/')
tryname += 2;