-
Notifications
You must be signed in to change notification settings - Fork 15
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
Configurable newline character (take 2) #3
base: master
Are you sure you want to change the base?
Conversation
… [suggested by Gisle Aas]
I examined your patch today. I didn't much like the fact that you now recommend setting $NL to a space together with $INDENT the empty string. These variables now seem too much connected. This also breaks formatting of hashes for the case where keys are indented (extra space show up after hash keys). My suggestion now is that simply setting $INDENT to "" should have the effect of suppressing newlines in the dumped output. See my oneline branch. If somebody really has a need for the old $INDENT = "" behaviour they would then have to run s/^\s+//gm on the dumped output. |
I personally don't think they're much interconnected, except the fact that for a proper single-line dump we need to set both of them. $NL is simply the newline string (what you would print for newline). And $INDENT is the simply the indentation string. But I agree that asking Data::Dump for a single-line dump should probably be done with a single setting (a la $Data::Dumper::Indent). |
Hi! I have released Data-Dump 1.25 which includes a $LINEWIDTH variable. You can set it to a very big number to avoid linebreaks entirely (except, of course, for the times where Data::Dump will enforce a linebreak for other reasons). Hopefully that fixes the issue. Otherwise, please file an issue on https://github.com/garu/data-dump/issues |
This is the continuation of issue #2.
I've sorted out the issues previously mentioned.