Skip Menu |

This queue is for tickets about the Sort-Key-OID CPAN distribution.

Report information
The Basics
Id: 40862
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Sort-Key-OID

People
Owner: salva [...] cpan.org
Requestors: SAPER [...] cpan.org
Cc:
AdminCc:

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



Subject: [patch] Allow leading dot in OIDs
Hello, I wanted to use Sort::Key::OID in a SNMP module I'm writing, but discovered that it doesn't want to handle absolute OIDs that start with a leading dot, like ".1.2.3". I find this quite cumbersome because it's more natural to store and sort absolute OIDs. Would you agree to allow OIDs with leading dot? Attached is a patch that seems to do the job. Thanks in advance -- Close the world, txEn eht nepO.
Subject: Sort-Key-OID-0.03-allow-leading-sep.diff
diff -ruN Sort-Key-OID-0.03-orig/OID.xs Sort-Key-OID-0.03-new/OID.xs --- Sort-Key-OID-0.03-orig/OID.xs 2008-02-19 10:08:24.000000000 +0100 +++ Sort-Key-OID-0.03-new/OID.xs 2008-11-12 15:27:10.679688268 +0100 @@ -42,8 +42,6 @@ if (v < lv) Perl_croak(aTHX_ "integer out of range inside OID"); } - if (j == i) - goto bad_oid; if (j < len) { if (sep != -1) { if (str[j] != sep)
solved in new version 0.04