abw/Template2 — pull request #19 by jonjensen (2013-05-24 20:07:43+00:00)
Title: Fix split for Perl 5.18.0

Template fails to pass the t/vmethods/text.t test under Perl 5.18.0. This patch rewrites split handling to use qr// which is consistent before and after the Perl 5.18.0 changes.

In perldelta 5.18.0 it reads:

split's first argument is more consistently interpreted

After some changes earlier in v5.17, split's behavior has been
simplified: if the PATTERN argument evaluates to a string containing
one space, it is treated the way that a literal string containing
one space once was.

It seems unwise to me but is possible that you'd want to let TT expose the underlying differences in Perl's implementation, in which case I did an alternative patch that just makes the test avoid differences in Perl. That's at https://github.com/jonjensen/Template2/commit/e564a2e6247ab74f42b660ff322680e51fae3532