develooper Front page | perl.perl5.porters | Postings from September 2003

[PATCH] don't defer :unique to

Thread Next
Rafael Garcia-Suarez
September 9, 2003 02:24
[PATCH] don't defer :unique to
Message ID:
The conservative patch below avoids loading when
the :unique attribute is seen in some souce code by a non-threaded
perl. I suggest that it should go in maint as well. There's no point
deferring the handling to a builtin attibute like :unique.

A less conservative patch would be to simply remove the #ifdef
here, because I don't see why GvUNIQUE shouldn't be set on a
non-ithreaded perl. But I'm no expert in multiplicity internals.

With this patch Liz's patch can be reapplied safely.

--- toke.c	(revision 2476)
+++ toke.c	(working copy)
@@ -3036,10 +3036,12 @@
 		    else if (!PL_in_my && len == 9 && strnEQ(s, "assertion", len))
 		    else if (PL_in_my == KEY_our && len == 6 &&
 			     strnEQ(s, "unique", len))
+			; /* skip that case to avoid loading */
 		    /* After we've set the flags, it could be argued that
 		       we don't need to do the setting
End of Patch.

modelinesig vim:ft=diff

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About