Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to change opening/closing tag character #3

Open
mla opened this issue Jan 3, 2015 · 0 comments
Open

Add ability to change opening/closing tag character #3

mla opened this issue Jan 3, 2015 · 0 comments

Comments

@mla
Copy link
Owner

mla commented Jan 3, 2015

From @Naturalist:

Hi Stefan!

On Sun, Jul 20, 2014 at 9:00 AM, Stefan Geneshky wrote:
Hey Maurice,

I want to use Text::Forge for a project, and I have a quick question for you:
I need to be able to change the <% and %> tags, so I can have >>JavaScript templates (which use the same tags) in the same file.

The start and end tags are hard-coded in the _parse function. I thought I could add them as >>attributes to the constructor, however it seems that the _parse function itself is invoked via the class >>name, and not with a blessed reference.

Is there are good reason for this? Could I change the _parse function to a method and add >>attributes to customize the start and end tags?

No, no good reason that I can see. And in fact _compile is calling _parse as an instance method >already. So I think we can just rename $class to $self there.

I'd be interested in folding your changes into the module, so let me know what you come up with.

Maurice

@mla mla mentioned this issue Jan 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant