Closed patrickkelso closed 9 years ago
Great find, thanks for the PR! Looks good to me.
I realised after I went to bed last night that I should wrap it in a case statement to use the old code if running puppet < 3.7.4 and the new code after.
Is there an issue with the new code when using an older version of Puppet? If so, please add that case statement to the PR.
Of course, that's not as easy as it sounds, because how do I compare versions?
I think as you're using the Future Parser that perhaps you just set the minimum version as 3.7.4.
Realistically the Future Parser won't be supported until Puppet 4 anyway, so users aren't losing anything.
Thanks Patrick, much appreciated, we'll merge this now.
Thanks. I do intend on adding some logic if they have older puppet, but like all the really cool things, I'll probably not have time until the weekend.
The future parser deprecates automatic conversion of strings to integers. https://tickets.puppetlabs.com/browse/PUP-3615 The fix is to use scanf to convert the strings to an array of integers (or in this case, 1 integer). Tested using the EMCCODE vagrant environment.