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

String Scalars are Rendered as Numbers in Scientific Notation #60

Closed
atancasis opened this issue Dec 6, 2019 · 3 comments
Closed

String Scalars are Rendered as Numbers in Scientific Notation #60

atancasis opened this issue Dec 6, 2019 · 3 comments

Comments

@atancasis
Copy link

There doesn't appear to be a way to force a given scalar to be rendered in string context, as illustrated:

❯ perl -MTemplate::Mustache -E 'say Template::Mustache->render("{{.}}", "123456789012345678901")'
1.23456789012346e+20

❯ perl -MTemplate::Mustache -E 'say Template::Mustache->render("{{.}}", 123456789012345678901)'
1.23456789012346e+20

❯ perl -MTemplate::Mustache -E 'say $Template::Mustache::VERSION'
1.3.2

❯ perl -v | grep version
This is perl 5, version 28, subversion 0 (v5.28.0) built for darwin-2level

I tried an alternative module, Mustache::Simple which appears to be handling this correctly, but thought I should provide this feedback.

Please don't hesitate to let me know if there's any additional information that I can provide. Thanks!

@yanick
Copy link
Owner

yanick commented Dec 7, 2019

Good find! Fixed and pushed to CPAN. thanks!

@yanick yanick closed this as completed Dec 7, 2019
@atancasis
Copy link
Author

thanks a BUNCH @yanick for the very quick turnaround, much appreciated!

@yanick
Copy link
Owner

yanick commented Dec 10, 2019

My pleasure. Thanks to the specifics, it was easy to reproduce, root, and ultimately fix. :-)

Enjoy!

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

2 participants