Skip Menu |

This queue is for tickets about the Algorithm-Interval2Prefix CPAN distribution.

Report information
The Basics
Id: 54741
Status: open
Priority: 0/
Queue: Algorithm-Interval2Prefix

People
Owner: LTHEGLER [...] cpan.org
Requestors: bartelar [...] telkom.co.za
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Incorrect handling of leading zeros
Date: Thu, 18 Feb 2010 10:46:12 +0200
To: <bug-Algorithm-Interval2Prefix [...] rt.cpan.org>
From: "Adrian Bartel (AR)" <bartelar [...] telkom.co.za>
The module does not appear to correctly handle ranges with leading zeros, which are relevant "when working with telephony switching equipment". For example, my @prefixes = interval2prefix('02','03'); print join(',', @prefixes); gives: 2,3 should be: 02, 03 my @prefixes = interval2prefix('001','100'); gives: 1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,100 should be: 001,002,003,004,005,006,007,008,009,01,02,03,04,05,06,07,08,09,100 my $regex = interval2regex('02','03'); ('02' =~ /$regex/) ? print "match" : print "no match" gives: no match regards, -------------------------------------------------------------- Adrian Bartel email: bartelar@telkom.co.za -------------------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This e-mail is subject to the Telkom SA electronic communication legal notice, available at : http://www.telkom.co.za/TelkomEMailLegalNotice.PDF ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Subject: Re: [rt.cpan.org #54741] Incorrect handling of leading zeros
Date: Thu, 18 Feb 2010 11:37:59 +0100
To: bug-Algorithm-Interval2Prefix [...] rt.cpan.org
From: Lars Thegler <lars [...] thegler.dk>
On Thu, Feb 18, 2010 at 9:47 AM, Adrian Bartel via RT <bug-Algorithm-Interval2Prefix@rt.cpan.org> wrote: Show quoted text
> my @prefixes = interval2prefix('02','03'); > print join(',', @prefixes); > > gives: 2,3 > should be: 02, 03
Yes, I get your point. I'll see what I can do. /Lars