# With Template::Stash
[pudge@yaz pudge]$ perl -MSlash::Test -leDisplay
[% hash = {"" => "foo", "bar" => "baz"}; a=""; b="bar"; hash.$a; hash.$b %]
foobaz

# With Template::Stash::XS
[pudge@yaz pudge]$ perl -MSlash::Test -leDisplay
[% hash = {"" => "foo", "bar" => "baz"}; a=""; b="bar"; hash.$a; hash.$b %]
baz


Yo homzees, Retrieving empty string hash keys is busted up in Stash::XS.
Here is a patch; I can't imagine this early in the morning whether or not
it will break something else (although I don't think that it would ...).

--- Stash.xs.orig       Thu Sep 20 08:05:38 2001
+++ Stash.xs    Thu Sep 20 08:05:50 2001
@@ -361,7 +361,7 @@
     TT_PERF_INIT;

     /* ignore _private or .private members */
-    if (!root || !item_len || *item == '_' || *item == '.') {
+    if (!root || *item == '_' || *item == '.') {
        return &PL_sv_undef;
     }

__PATCH__

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/


Reply via email to