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

RT 59208 #38

Merged
merged 2 commits into from
Apr 24, 2014
Merged

RT 59208 #38

merged 2 commits into from
Apr 24, 2014

Conversation

lightsey
Copy link

RT 59208 was really bothering me, so I played around with the parser until I could come up with a workable fix. It should work correctly now.

SET var = "a&b" FILTER html
SET var = "a&b" | uri | html
SET var = GET othervar | html

I'm not very familiar with YACC and YAPP so buyer beware...

John Lightsey added 2 commits April 12, 2014 21:36
RT 59208: The handling of "SET var = expression" was very limited compared
to "var = expression". This resulted in unintuitive behavior such as filters
being applied to the nonexistent output of the SET command instead of the
value being assigned.
abw added a commit that referenced this pull request Apr 24, 2014
@abw abw merged commit 02bfb1f into abw:master Apr 24, 2014
@abw
Copy link
Owner

abw commented Apr 24, 2014

Thanks lightsey!

@abw
Copy link
Owner

abw commented Sep 17, 2014

Hi John,

I've had to revert this change because it causes a parse error on a valid statement like this:

[% SET a=b IF c %]

I've added a test t/vars.t to demonstrate this. If you can modify the patch in such a way as to prevent this breakage then I'll gladly apply it.

Thanks again.

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Oct 2, 2014
#-----------------------------------------------------------------------
# Version 2.26 - 17th September 2014
#------------------------------------------------------------------------

* Andy Wardley added outline directives. See Template::Manual::Syntax and
  Template::Manual::Config for details of the OUTLINE_TAG option and new
  'outline' TAG_STYLE.  See t/outline.t for examples.

* Andy Wardley improved the handling of keywords when the ANYCASE option
  is in use.  See t/anycase.t for examples.

* Chromatic fixed UTF-8 encoding in URLs in URL plugin.
  abw/Template2#31

* Brian Fraser added support for platforms without LC_ALL/setlocale.
  abw/Template2#34

* Amiri Barksdale fixed RT46691 to plug filter memory leaks
  abw/Template2#36

* John Lightsey fixed RT59208 to improve SET
  abw/Template2#38
  UPDATE: This had to be reverted as it cause a subtle breakage elsewhere
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Oct 11, 2014
#-----------------------------------------------------------------------
# Version 2.26 - 17th September 2014
#------------------------------------------------------------------------

* Andy Wardley added outline directives. See Template::Manual::Syntax and
  Template::Manual::Config for details of the OUTLINE_TAG option and new
  'outline' TAG_STYLE.  See t/outline.t for examples.

* Andy Wardley improved the handling of keywords when the ANYCASE option
  is in use.  See t/anycase.t for examples.

* Chromatic fixed UTF-8 encoding in URLs in URL plugin.
  abw/Template2#31

* Brian Fraser added support for platforms without LC_ALL/setlocale.
  abw/Template2#34

* Amiri Barksdale fixed RT46691 to plug filter memory leaks
  abw/Template2#36

* John Lightsey fixed RT59208 to improve SET
  abw/Template2#38
  UPDATE: This had to be reverted as it cause a subtle breakage elsewhere
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

Successfully merging this pull request may close these issues.

None yet

2 participants