[system] / trunk / xmlrpc / daemon / Frontier / RPC2.pm Repository:
ViewVC logotype

Diff of /trunk/xmlrpc/daemon/Frontier/RPC2.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1165 Revision 1166
178 } elsif ($ref eq 'Frontier::RPC2::String') { 178 } elsif ($ref eq 'Frontier::RPC2::String') {
179 push @text, "<value><string>", $item->repr, "</string></value>\n"; 179 push @text, "<value><string>", $item->repr, "</string></value>\n";
180 } elsif ($ref eq 'Frontier::RPC2::Integer') { 180 } elsif ($ref eq 'Frontier::RPC2::Integer') {
181 push @text, "<value><int>", $item->repr, "</int></value>\n"; 181 push @text, "<value><int>", $item->repr, "</int></value>\n";
182 } elsif ($ref eq 'Frontier::RPC2::Double') { 182 } elsif ($ref eq 'Frontier::RPC2::Double') {
183 push @text, "<value><double>", item->repr, "</double></value>\n"; 183 push @text, "<value><double>", $item->repr, "</double></value>\n";
184 } elsif ($ref eq 'Frontier::RPC2::DateTime::ISO8601') { 184 } elsif ($ref eq 'Frontier::RPC2::DateTime::ISO8601') {
185 push @text, "<value><dateTime.iso8601>", $item->repr, "</dateTime.iso8601></value>\n"; 185 push @text, "<value><dateTime.iso8601>", $item->repr, "</dateTime.iso8601></value>\n";
186 } elsif ($ref eq 'Frontier::RPC2::Base64') { 186 } elsif ($ref eq 'Frontier::RPC2::Base64') {
187 push @text, "<value><base64>", $item->repr, "</base64></value>\n"; 187 push @text, "<value><base64>", $item->repr, "</base64></value>\n";
188 } elsif ($ref eq 'Complex1') { 188 } elsif ($ref eq 'Complex1') {
232sub _scalar { 232sub _scalar {
233 my $self = shift; my $value = shift; 233 my $self = shift; my $value = shift;
234 $value = '' unless defined($value); # hack -- is this necessary? desirable? 234 $value = '' unless defined($value); # hack -- is this necessary? desirable?
235 # these are from `perldata(1)' 235 # these are from `perldata(1)'
236 if ($value =~ /^[+-]?\d+$/) { 236 if ($value =~ /^[+-]?\d+$/) {
237# return ("<value><i4>$value</i4></value>"); # doesn't seem right
237 return ("<value><i4>$value</i4></value>"); 238 return ("<value><int>$value</int></value>");
238 } elsif ($value =~ /^(-?(?:\d+(?:\.\d*)?|\.\d+)|([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)$/) { 239 } elsif ($value =~ /^(-?(?:\d+(?:\.\d*)?|\.\d+)|([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)$/) {
239 return ("<value><double>".sprintf('%0.13f',$value)."</double></value>"); # Frontier can't handle exponential notation 240 # return ("<value><double>".sprintf('%0.13f',$value)."</double></value>"); # Frontier can't handle exponential notation
241 return ("<value><string>".sprintf('%0.13f',$value)."</string></value>"); # Frontier can't handle exponential notation
240 #return ("<value><double>$value</double></value>"); 242 #return ("<value><double>$value</double></value>");
241 } else { 243 } else {
242 $value =~ s/([&<>\"])/$char_entities{$1}/ge; 244 $value =~ s/([&<>\"])/$char_entities{$1}/ge;
243 return ("<value><string>$value</string></value>"); 245 return ("<value><string>$value</string></value>");
244 } 246 }

Legend:
Removed from v.1165  
changed lines
  Added in v.1166

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9