Skip Menu |

This queue is for tickets about the Number-Format CPAN distribution.

Report information
The Basics
Id: 42036
Status: resolved
Priority: 0/
Queue: Number-Format

People
Owner: Nobody in particular
Requestors: JSWARTZ [...] cpan.org
Cc:
AdminCc:

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



Subject: format_bytes documentation incorrect
Documentation for format_bytes says: The second parameter can be either a reference to a hash that sets options, or a number. ... format_bytes(1048576, { units => 'K'}) yields '1,024K' instead of '1M' In fact, format_bytes as implemented expects a hash, not a hash reference, and the key is 'unit', not 'units'.
Subject: Re: [rt.cpan.org #42036] format_bytes documentation incorrect
Date: Mon, 29 Dec 2008 22:09:39 -0800
To: bug-Number-Format [...] rt.cpan.org
From: "William Ward - CPAN" <wrw [...] cpan.org>
Fixed in 1.61 On Mon, Dec 29, 2008 at 9:37 PM, JSWARTZ via RT <bug-Number-Format@rt.cpan.org> wrote: Show quoted text
> Tue Dec 30 00:37:07 2008: Request 42036 was acted upon. > Transaction: Ticket created by JSWARTZ > Queue: Number-Format > Subject: format_bytes documentation incorrect > Broken in: (no value) > Severity: Normal > Owner: Nobody > Requestors: JSWARTZ@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=42036 > > > > Documentation for format_bytes says: > > The second parameter can be either a reference to a hash that sets > options, or a number. > > ... > > format_bytes(1048576, { units => 'K'}) yields '1,024K' > instead of '1M' > > In fact, format_bytes as implemented expects a hash, not a hash > reference, and the key is 'unit', not 'units'. > >