@@ -185,7 +185,11 @@ =head1 NAME
185
185
{
186
186
local ($/ );
187
187
$source = <>; # slurp standard input
188
+ <<<<<<< HEAD
188
189
#print $source ; # return input to BBedit
190
+ =======
191
+ print $source ; # return input to BBedit
192
+ >>>>>>> turn_off_warnings_on_webservice
189
193
190
194
}
191
195
############################################
@@ -220,6 +224,7 @@ =head1 NAME
220
224
$output = $xmlrpc_client ->formatRenderedProblem;
221
225
###HACK fixme
222
226
print pretty_print_rh($result ) if $UNIT_TESTS_ON ;
227
+
223
228
} else {
224
229
print "\n\n ERRORS in renderProblem \n\n ";
225
230
$output = $xmlrpc_client ->{output}; # error report
@@ -235,6 +240,46 @@ =head1 NAME
235
240
##################################################
236
241
# end input/output section
237
242
##################################################
243
+ sub pretty_print_rh {
244
+ shift if UNIVERSAL::isa($_ [0] => __PACKAGE__);
245
+ my $rh = shift;
246
+ my $indent = shift || 0;
247
+ my $out = "";
248
+ my $type = ref($rh );
249
+
250
+ if (defined($type ) and $type ) {
251
+ $out .= " type = $type ; ";
252
+ } elsif (! defined($rh )) {
253
+ $out .= " type = UNDEFINED; ";
254
+ }
255
+ return $out ." " unless defined($rh );
256
+
257
+ if ( ref($rh ) =~/HASH/ or "$rh " =~/HASH/ ) {
258
+ $out .= "{\n ";
259
+ $indent ++;
260
+ foreach my $key (sort keys %{$rh }) {
261
+ $out .= " "x$indent ."$key => " . pretty_print_rh( $rh ->{$key }, $indent ) . "\n ";
262
+ }
263
+ $indent --;
264
+ $out .= "\n "." "x$indent ."}\n ";
265
+
266
+ } elsif (ref($rh ) =~ /ARRAY/ or "$rh " =~/ARRAY/) {
267
+ $out .= " ( ";
268
+ foreach my $elem ( @{$rh } ) {
269
+ $out .= pretty_print_rh($elem , $indent );
270
+
271
+ }
272
+ $out .= " ) \n ";
273
+ } elsif ( ref($rh ) =~ /SCALAR/ ) {
274
+ $out .= "scalar reference ". ${$rh} ;
275
+ } elsif ( ref($rh ) =~/Base64/ ) {
276
+ $out .= "base64 reference " .$$rh ;
277
+ } else {
278
+ $out .= $rh ;
279
+ }
280
+
281
+ return $out ." ";
282
+ }
238
283
239
284
sub pretty_print_rh {
240
285
shift if UNIVERSAL::isa($_ [0] => __PACKAGE__);
@@ -277,5 +322,8 @@ sub pretty_print_rh {
277
322
return $out ." ";
278
323
}
279
324
325
+ <<<<<<< HEAD
280
326
327
+ =======
328
+ >>>>>>> turn_off_warnings_on_webservice
281
329
1;
0 commit comments