Skip Menu |

This queue is for tickets about the Text-Autoformat CPAN distribution.

Report information
The Basics
Id: 18329
Status: open
Priority: 0/
Queue: Text-Autoformat

People
Owner: Nobody in particular
Requestors: akalaveshi [...] rsasecurity.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.13
Fixed in: (no value)



Subject: oddity when formatting strings like '1.0.1' (renumber=>0 doesn't work?)
The following bit of code (using perl v5.8.7 on linux-2.4-x86) seems to generate incorrect results. Even though I've explicitly set "renumber=>0", a string like "1.0.1" transforms to "1..1". Note that the string "1.1.1" remains unaltered. Is this a bug? <output> $ ./test.pl version: 1.13 1..1 1..3 1..2 inline, the text works fine -- like 1.0.1, etc </output> <code_snippet> #!/bin/perl use Text::Autoformat qw(autoformat break_wrap); print "version: $Text::Autoformat::VERSION\n"; my $text = <<ENDTEXT; 1.0.1 1.0.3 1.0.2 inline, the text works fine -- like 1.0.1, etc ENDTEXT print autoformat($text, {all=>1,renumber=>0}); </code_snippet>
This has been open a while, so it's not clear if it's likely to get fixed or what. But if anyone else stumbles across this, you can fix the weird eating-0s behavior by specifying {lists => 0} in the autoformat arguments: $ autoformat "18.208.0.1" 18.208..1 $ autoformat "18.208.0.1", {lists => 0} 18.208.0.1