This queue is for tickets about the Perl6-Form CPAN distribution.

Report information
The Basics
Id:
95138
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
penguinsgomoo [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Thousands separated numeric fields
Date: Mon, 28 Apr 2014 13:01:13 -0700
To: bug-Perl6-Form@rt.cpan.org
From: Holden Ridge <penguinsgomoo@gmail.com>

using Perl6::Form version 0.04

> perl -v

 

This is perl, v5.10.0 built for x86_64-linux-thread-multi

> uname -a

Linux box 3.0.80-0.7-default #1 SMP Tue Jun 25 18:32:49 UTC 2013 (25740f8) x86_64 x86_64 x86_64 GNU/Linux

 


1.       Thousands separated numbers without imperative widths, and no digits right of the decimal point do not seem to work.

2.       Thousands separated numbers with imperative widths, parentheses for negatives, and digits right of the decimal point do not seem to work.

3.       Thousands separated numbers with imperative widths, without parentheses for negatives, and no digits right of the decimal point do not seem to work

 Here is a short sample program where thousands separated fields seem to work inconsistently:

#!/pathtoperl/perl

use strict;

use warnings;

use Perl6::Form;

my $num = -13141.143131;

 

print form "{->,>>>,>>>.<<}", $num; #    -13,141.143

print form "{(>,>>>,>>>.<)}", $num; #    (13,141.14)

print form "{>>,>>>,>>>.<<}", $num; #     13,141.143

 

print form "{->,>>>,>>>}", $num;    #      -,

print form "{(>,>>>,>>>}", $num;    #      (,

print form "{>>,>>>,>>>}", $num;    #       ,

 

print form "{(>,{12.1},>>>.<<<<)}", $num; #         (.)

print form "{->,{12.1},>>>.<<<<}", $num;  #   -13,141.1

print form "{>>,{12.1},>>>.<<<<}", $num;  #    13,141.1

 

print form "{(>,{12.0},>>>.<<<<)}", $num; #    (13,141)

print form "{->,{12.0},>>>.<<<<}", $num;  #           .

print form "{>>,{12.0},>>>.<<<<}", $num;  #          -.


Thank You,

Holden

Subject: Re: [rt.cpan.org #95138] Thousands separated numeric fields
Date: Tue, 29 Apr 2014 19:50:24 +1000
To: bug-Perl6-Form@rt.cpan.org
From: Damian Conway <damian@conway.org>
Thanks Holden, These are all fixed in the new release I just uploaded to CPAN. Much appreciated. Damian
Subject: Re: [rt.cpan.org #95138] Resolved: Thousands separated numeric fields
Date: Tue, 29 Apr 2014 11:15:41 -0700
To: bug-Perl6-Form@rt.cpan.org
From: Holden Ridge <penguinsgomoo@gmail.com>
There still seems to be an issue with whole number, thousands separated numbers with parentheses for negatives:
#!/path to perl/perl
use strict;
use warnings;
use Perl6::Form;

my $num = -13141.143131;

print form "{->>,>>>,>>>}", $num;  #      -1,3141
print form "{>>,>>>,>>>}", $num;  #      1,3141
print form "{(>>,>>>,>>>)}", $num;  #Field 1 is of unknown type: {(>>,>>>,>>>)}




On Tue, Apr 29, 2014 at 2:51 AM, Damian_Conway via RT <bug-Perl6-Form@rt.cpan.org> wrote:
Show quoted text
<URL: https://rt.cpan.org/Ticket/Display.html?id=95138 >

According to our records, your request has been resolved. If you have any
further questions or concerns, please respond to this message.

Subject: Re: [rt.cpan.org #95138] Resolved: Thousands separated numeric fields
Date: Tue, 29 Apr 2014 13:54:22 -0700
To: bug-Perl6-Form@rt.cpan.org
From: Holden Ridge <penguinsgomoo@gmail.com>
Also, comma separated whole numbers seem to require longer formats than they should.

#!perl
use strict;
use warnings;
use Perl6::Form;

my $num = -13141.143131;

# These seem correct:
print form "{>{6.1}>,>>>,>>>.<}",  $num; #####.#
print form "{>{7.1}>,>>>,>>>.<}",  $num; ######.#
print form "{>{8.1}>,>>>,>>>.<}",  $num; #13,141.1
print form "{>{9.1}>,>>>,>>>.<}",  $num; # 13,141.1
print form "{>{10.1}>,>>>,>>>.<}", $num; #  13,141.1
print form "{>{11.1}>,>>>,>>>.<}", $num; #   13,141.1
print form "{>{12.1}>,>>>,>>>.<}", $num; #    13,141.1
print "\n";

#The following 3 sets seem off:
print form "{>{6}>,>>>,>>}",  $num; #     1
print form "{>{7}>,>>>,>>}",  $num; #     13
print form "{>{8}>,>>>,>>}",  $num; #     13,
print form "{>{9}>,>>>,>>}",  $num; #     13,1
print form "{>{10}>,>>>,>>}", $num; #     13,14
print form "{>{11}>,>>>,>>}", $num; #     13,141
print form "{>{12}>,>>>,>>}", $num; #      13,141
print "\n";

print form "{>,>>}",          $num; ###,
print form "{>>,>>}",         $num; ####,
print form "{>>>,>>}",        $num; #####,
print form "{,>>>,>>}",       $num; #   13,141
print form "{>,>>>,>>}",      $num; #    13,141
print form "{>>>,>>>,>>}",    $num; #      13,141
print form "{,>>>,>>>,>>}",   $num; #       13,141
print "\n";

print form "{-,>>}",          $num; #######
print form "{->,>>}",         $num; ####,
print form "{->>,>>}",        $num; #####,
print form "{->>>,>>}",       $num; ######,
print form "{-,>>>,>>}",      $num; #   -13,141
print form "{->>,>>>,>>}",    $num; #     -13,141
print form "{->>>,>>>,>>}",   $num; #      -13,141



On Tue, Apr 29, 2014 at 11:15 AM, Holden Ridge <penguinsgomoo@gmail.com> wrote:
Show quoted text
There still seems to be an issue with whole number, thousands separated numbers with parentheses for negatives:
#!/path to perl/perl
use strict;
use warnings;
use Perl6::Form;

my $num = -13141.143131;

print form "{->>,>>>,>>>}", $num;  #      -1,3141
print form "{>>,>>>,>>>}", $num;  #      1,3141
print form "{(>>,>>>,>>>)}", $num;  #Field 1 is of unknown type: {(>>,>>>,>>>)}




On Tue, Apr 29, 2014 at 2:51 AM, Damian_Conway via RT <bug-Perl6-Form@rt.cpan.org> wrote:
<URL: https://rt.cpan.org/Ticket/Display.html?id=95138 >

According to our records, your request has been resolved. If you have any
further questions or concerns, please respond to this message.


Subject: Re: [rt.cpan.org #95138] Resolved: Thousands separated numeric fields
Date: Wed, 30 Apr 2014 15:52:19 +1000
To: bug-Perl6-Form@rt.cpan.org
From: Damian Conway <damian@conway.org>
Thanks again, Holden. The problems you've highlighted are more significant and will require more effort to overcome. I have queued the work in my ToDo list and will address it as soon as I am able (which may not be soon, I'm afraid). I greatly appreciate the report, and am only sorry I cannot offer an immediate fix. Damian


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.