On Fri, Feb 09, 2007 at 07:46:20PM +0000, Andy Wardley wrote:
> Randal L. Schwartz wrote:
> >Andy> Of particular interest (other than the fact that you can now install 
> >it
> >Andy> on your shiny powerbooks without errors)
> >
> >.. as long as you don't have bleadperl?  Or is my problem for all OSX?
> 
> Yep, it's a problem with bleadperl.  But thanks to Steve Peters we already
> have a patch for it.  I'm applying it now and downloading bleadperl to test
> it with.
> 
>   https://rt.cpan.org/Public/Bug/Display.html?id=22506
> 

Excellent news!

Unfortunately, that patch didn't get all the updates needed to fix all the 
test, assertion, and compile failures in bleadperl.  The patch below fixes it 
all.

Note: this patch was against TT-2.15, so it may need some adjustments.

Steve Peters
[EMAIL PROTECTED]


--- xs/Stash.xs.old     2007-01-09 20:27:49.000000000 -0600
+++ xs/Stash.xs 2007-01-16 15:14:48.000000000 -0600
@@ -499,7 +499,7 @@
         }

         /* drop-through if not an object or method not found  */
-        switch SvTYPE(SvRV(root)) {
+        switch (SvTYPE(SvRV(root))) {

         case SVt_PVHV:                             /* HASH */
             roothv = (HV *) SvRV(root);
@@ -518,14 +518,8 @@

             /* avoid 'modification of read-only value' error */
             newsv = newSVsv(value);
-            if (hv_store(roothv, key, key_len, newsv, 0)) {
-                /* invoke any tied magical STORE method */
-                debug(" - stored hash item\n");
-                SvSETMAGIC(newsv);
-            }
-            else {
-                printf(" - did not store hash item (hv_store() returned 
NULL)\n");
-            }
+            hv_store(roothv, key, key_len, newsv, 0);
+            SvSETMAGIC(newsv);

             return value;
             break;
@@ -991,7 +985,7 @@
     STRLEN jlen;
     char *joint;

-    if ((svp = av_fetch(args, 0, FALSE)) != NULL) {
+    if (args && (svp = av_fetch(args, 0, FALSE)) != NULL) {
         joint = SvPV(*svp, jlen);
     } else {
         joint = " ";



_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to