Skip to content

Perl ZPath and ZTemplate implementation #1

@tobyink

Description

@tobyink

zpath.me doesn't have any contact details listed to add new implementations, so I figured I would file an issue here and hope for the best.

Here's the implementation:
https://metacpan.org/release/TOBYINK/Data-ZPath-0.001000

I extended ZTemplate a little. I allow {{/}} as a shortcut to close a block:

{{# metadata/author }}
 <meta name="author" content="{{.}}" />
{{/}}

I allow :: raw and :: html to indicate how something should be escaped:

<h1>{{ product/name :: html }}</h1>

Other than that, the implementations are pretty faithful to the original. I'm considering adding some additional functions to ZPath for other datatypes like DateTimes (year(), month(), etc functions) but haven't done that yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions