Subject: | Converting _txtdata to _attr truncates if more than 1 equals sign |
When converting _txtdata into _attr name/value pairs, the value is
truncated if it contains more than 1 equals (=) sign. This is caused by
not putting a limit on the split that does the conversion.
An example would be if _txtdata contained:
key=value=2
current result is:
key = "value"
what is expected is:
key => "value=2"
Here is a patch for Net::Rendezvous::Entry.pm
--------------------
--- Entry.pm 2007-03-05 15:02:13.343750000 -0500
+++ Entry.pm.orig 2004-12-28 02:36:19.000000000 -0500
@@ -203,7 +203,7 @@
$self->txtdata([$txtrr->char_str_list ]);
$self->index($txti++);
foreach my $txtln ( $txtrr->char_str_list ) {
- my ($key,$val) = split(/=/,$txtln,2);
+ my ($key,$val) = split(/=/,$txtln);
$self->attribute($key, $val);
}
$txti++;
--------------------
My platform is Activestate Perl 5.8.8 build 820. Net::Rendezvous module
version 0.90. Windows XP SP2 with all current patches.