Skip to content

Alternative fix for RT#86592#11

Open
basiliscos wants to merge 1 commit intogisle:masterfrom
basiliscos:master
Open

Alternative fix for RT#86592#11
basiliscos wants to merge 1 commit intogisle:masterfrom
basiliscos:master

Conversation

@basiliscos
Copy link
Copy Markdown

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.

Comment thread lib/Data/Dump.pm
$out = "undef";
}
elsif (do {no warnings 'numeric'; $$rval + 0 eq $$rval}) {
elsif (looks_like_number($$rval) && $$rval + 0 eq $$rval) {
Copy link
Copy Markdown

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