You are here: Foswiki>Tasks Web>Item9011 (13 May 2010, MichaelDaum)Edit Attach

Item9011: attrs parser doesn't set _DEFAULT key

pencil
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: MichaelDaum
Waiting For:
Last Change By: MichaelDaum
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

 

ItemTemplate edit

Summary attrs parser doesn't set _DEFAULT key
ReportedBy MichaelDaum
Codebase
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r3 - 13 May 2010, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy