summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch')
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
new file mode 100644
index 0000000000..1f92cea3ae
--- /dev/null
+++ b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
@@ -0,0 +1,36 @@
1Description: Support dash-less args to from_string.
2Author: Tim Retout <diocles@debian.org>
3Bug-Debian: http://bugs.debian.org/635607
4
5The module Data::GUID depends on Data::UUID supporting this behaviour.
6
7--- a/perl/uuid_compat.pm
8+++ b/perl/uuid_compat.pm
9@@ -93,7 +93,9 @@
10 $uuid->import('str',
11 $str =~ /^0x/
12 ? join '-', unpack('x2 a8 a4 a4 a4 a12', $str)
13- : $str
14+ : $str =~ /-/
15+ ? $str
16+ : join '-', unpack('A8 A4 A4 A4 A12', $str)
17 );
18 return $uuid->export('bin');
19 }
20--- a/perl/uuid_compat.ts
21+++ b/perl/uuid_compat.ts
22@@ -28,7 +28,7 @@
23 ## uuid_compat.ts: Data::UUID Backward Compatibility Perl API (Perl test suite part)
24 ##
25
26-use Test::More tests => 14;
27+use Test::More tests => 16;
28
29 BEGIN {
30 use_ok('Data::UUID');
31@@ -53,3 +53,5 @@
32 ok($uuid8 = $ug->from_string("6ba7b811-9dad-11d1-80b4-00c04fd430c8"));
33 ok($ug->compare($uuid7, $uuid8) == 0);
34
35+ok($uuid9 = $ug->from_string("6ba7b8119dad11d180b400c04fd430c8"));
36+ok($ug->compare($uuid7, $uuid9) == 0);