Item9011: attrs parser doesn't set _DEFAULT key
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
I just tried this using "friendly" mode
my $attrs = new Foswiki::Attrs('foo', 1)
... and expected the _DEFAULT key to be set to value
foo
Well, it doesn't. It takes
foo
as a key instead of a value not generating any _DEFAULT.
An "unfriendly"
my $attrs = new Foswiki::Attrs('foo')
...
does create a _DEFAULT with value
foo
.
--
MichaelDaum - 12 May 2010
That's correct; friendly mode insists on quotes. "Friendly" mode was not the best name for it. It's only maintained for compatibility. I can't recommend using it.
I don't see any bug here, just an observation....
--
CrawfordCurrie - 13 May 2010
Ah, did not know it is there for legacy reasons, thought it was the "advanced" mode. Well, the "error" is that parsing a plain
foo
(without quotes) is not setting
_DEFAULT to
foo
. Not sure if we can or should fix it. In that I agree that this is an observation.
--
MichaelDaum - 13 May 2010