prematurely, or affect cloning of pad constants
p4raw-id: //depot/perl@5056
bool item_is_utf = FALSE;
if (!SvMAGICAL(tmpForm) || !SvCOMPILED(tmpForm)) {
- SvREADONLY_off(tmpForm);
- doparseform(tmpForm);
+ if (SvREADONLY(tmpForm)) {
+ SvREADONLY_off(tmpForm);
+ doparseform(tmpForm);
+ SvREADONLY_on(tmpForm);
+ }
+ else
+ doparseform(tmpForm);
}
SvPV_force(PL_formtarget, len);
#!./perl
-# $RCSfile: write.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:38 $
-
-print "1..6\n";
+print "1..8\n";
my $CAT = ($^O eq 'MSWin32') ? 'type' : 'cat';
else
{ print "not ok 6\n"; }
+# test lexicals and globals
+{
+ my $this = "ok";
+ our $that = 7;
+ format LEX =
+@<<@|
+$this,$that
+.
+ open(LEX, ">&STDOUT") or die;
+ write LEX;
+ $that = 8;
+ write LEX;
+}