xslate / p5-Text-Xslate

Scalable template engine for Perl5

Home Page:https://metacpan.org/release/Text-Xslate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load macros from other template files

mikeraynham opened this issue · comments

Commit cd861dc added a question about being unable to load macros from other template files, but the earlier commit 33369ab introduced cascade components as libraries. cascade with therefore allows macros to be loaded from other template files, as shown in t/020_features/021_overlay.t from 33369ab (now t/030_kolon/021_overlay.t). t/030_kolon/040_external_macro.t skips all tests with the reason external macros are not yet implemented, but it uses import (which appears to have been a work in progress), not cascade with.

Should the documentation and tests be updated to show that template files can be used as macro libraries? I am happy to produce a patch.

I'm looking for this same feature, but I am using TTerse syntax. It seems that TTerse does not have CASCADE, but when I use INCLUDE it does not import the macros. Is there a workaround?