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

Alternative fix for RT#86592 #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

basiliscos
Copy link

Here is alternative fix for RT#86592, which uses Scalar::Util looks_like_number to do not change the output.

B is still used for tests.

@@ -229,7 +230,7 @@ sub _dump
if (!defined $$rval) {
$out = "undef";
}
elsif (do {no warnings 'numeric'; $$rval + 0 eq $$rval}) {
elsif (looks_like_number($$rval) && $$rval + 0 eq $$rval) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will still convert a string that looks like a number into a number.

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.

2 participants