[Petal] A structure bug

jhiver@mkdoc.com jhiver@mkdoc.com
Sat, 5 Oct 2002 12:34:05 +0100


Hi William,

> Well, it appears that there is a problem with the structure modifer in the
> recent releases of Petal. I was using it successfully with 0.72 but now
> it's no longer working. I have included the usual test files with this
> email.

In the template your are writing:

    <li><p petal:replace="structure:html_string"></p></li>

Please bare in mind that 'structure' and 'fresh' are petal KEYWORDS, not
modifiers. They are deeply burried within Petal::Hash core, while modifiers
are just merely... well... modifiers. So you should write:

    <li><p petal:replace="structure html_string"></p></li>

(notice the absence of columns after 'structure')

I have updated the documentation when I released 0.73 I think. I encourage
you to read the Petal::Expressions [1] article I have added to the
distribution.


> BTW, I looked in the tests folder to see if I could find an existing test
> to see about debugging it. I couldn't find a test for the structure
> modifier. I wish I had the time and ability to better understand your code
> and give you patches instead of reports. It's a level or two above my
> present skills, though <g>.

No worries... try with the proper syntax, and tell me if it works :-)

Cheers,

[1] http://search.cpan.org/author/JHIVER/Petal-0.74/lib/Petal/Expressions.pm