MUTEX_INIT(&PL_svref_mutex);
#endif /* EMULATE_ATOMIC_REFCOUNTS */
+ MUTEX_INIT(&PL_cred_mutex);
+
thr = init_main_thread();
#endif /* USE_THREADS */
+ PL_curcop = &PL_compiling; /* needed by ckWARN, right away */
+
PL_linestr = NEWSV(65,79);
sv_upgrade(PL_linestr,SVt_PVIV);
PL_minus_a = FALSE;
PL_minus_F = FALSE;
PL_doswitches = FALSE;
- PL_dowarn = FALSE;
+ PL_dowarn = G_WARN_OFF;
PL_doextract = FALSE;
PL_sawampersand = FALSE; /* must save all match strings */
PL_sawstudy = FALSE; /* do fbm_instr on all strings */
DEBUG_P(debprofdump());
#ifdef USE_THREADS
+ MUTEX_DESTROY(&PL_strtab_mutex);
MUTEX_DESTROY(&PL_sv_mutex);
MUTEX_DESTROY(&PL_eval_mutex);
+ MUTEX_DESTROY(&PL_cred_mutex);
COND_DESTROY(&PL_eval_cond);
/* As the penultimate thing, free the non-arena SV for thrsv */
time(&PL_basetime);
oldscope = PL_scopestack_ix;
+ PL_dowarn = G_WARN_OFF;
JMPENV_PUSH(ret);
switch (ret) {
case 'u':
case 'U':
case 'v':
+ case 'W':
+ case 'X':
case 'w':
if (s = moreswitches(s))
goto reswitch;
if (PL_do_undump)
my_unexec();
- if (PL_dowarn)
+ if (ckWARN(WARN_ONCE))
gv_check(PL_defstash);
LEAVE;
#ifdef OEMVS
printf("MVS (OS390) port by Mortice Kern Systems, 1997-1998\n");
#endif
+#ifdef __VOS__
+ printf("Stratus VOS port by Paul_Green@stratus.com, 1997-1998\n");
+#endif
+#ifdef __OPEN_VM
+ printf("VM/ESA port by Neale Ferguson, 1998\n");
+#endif
+#ifdef POSIX_BC
+ printf("BS2000 (POSIX) port by Start Amadeus GmbH, 1998\n");
+#endif
#ifdef BINARY_BUILD_NOTICE
BINARY_BUILD_NOTICE;
#endif
Internet, point your browser at http://www.perl.com/, the Perl Home Page.\n\n");
PerlProc_exit(0);
case 'w':
- PL_dowarn = TRUE;
+ if (! (PL_dowarn & G_WARN_ALL_MASK))
+ PL_dowarn |= G_WARN_ON;
+ s++;
+ return s;
+ case 'W':
+ PL_dowarn = G_WARN_ALL_ON|G_WARN_ON;
+ PL_compiling.cop_warnings = WARN_ALL ;
+ s++;
+ return s;
+ case 'X':
+ PL_dowarn = G_WARN_ALL_OFF;
+ PL_compiling.cop_warnings = WARN_NONE ;
s++;
return s;
case '*':
break;
case '-':
case 0:
-#ifdef WIN32
+#if defined(WIN32) || !defined(PERL_STRICT_CR)
case '\r':
#endif
case '\n':
about not iterating on it, and not adding tie magic to it.
It is properly deallocated in perl_destruct() */
PL_strtab = newHV();
+#ifdef USE_THREADS
+ MUTEX_INIT(&PL_strtab_mutex);
+#endif
HvSHAREKEYS_off(PL_strtab); /* mandatory */
hv_ksplit(PL_strtab, 512);
PL_debstash = GvHV(gv_fetchpv("DB::", GV_ADDMULTI, SVt_PVHV));
PL_globalstash = GvHV(gv_fetchpv("CORE::GLOBAL::", GV_ADDMULTI, SVt_PVHV));
/* We must init $/ before switches are processed. */
- sv_setpvn(GvSV(gv_fetchpv("/", TRUE, SVt_PV)), "\n", 1);
+ sv_setpvn(perl_get_sv("/", TRUE), "\n", 1);
}
STATIC void
%s | %_ -C %_ %s",
(PL_doextract ? "-e \"1,/^#/d\n\"" : ""),
#else
+# ifdef __OPEN_VM
+ sv_setpvf(cmd, "\
+%s %s -e '/^[^#]/b' \
+ -e '/^#[ ]*include[ ]/b' \
+ -e '/^#[ ]*define[ ]/b' \
+ -e '/^#[ ]*if[ ]/b' \
+ -e '/^#[ ]*ifdef[ ]/b' \
+ -e '/^#[ ]*ifndef[ ]/b' \
+ -e '/^#[ ]*else/b' \
+ -e '/^#[ ]*elif[ ]/b' \
+ -e '/^#[ ]*undef[ ]/b' \
+ -e '/^#[ ]*endif/b' \
+ -e 's/^[ ]*#.*//' \
+ %s | %_ %_ %s",
+# else
sv_setpvf(cmd, "\
%s %s -e '/^[^#]/b' \
-e '/^#[ ]*include[ ]/b' \
-e '/^#[ ]*endif/b' \
-e 's/^[ ]*#.*//' \
%s | %_ -C %_ %s",
+# endif
#ifdef LOC_SED
LOC_SED,
#else
p = SvPVX(PL_e_script);
nl = strchr(p, '\n');
nl = (nl) ? nl+1 : SvEND(PL_e_script);
- if (nl-p == 0)
+ if (nl-p == 0) {
+ filter_del(read_e_script);
return 0;
+ }
sv_catpvn(buf_sv, p, nl-p);
sv_chop(PL_e_script, nl);
return 1;