Christian Couder [off-list ref] writes:
...
+sub print_codespeed_results {
+ my ($results_section) = @_;
+
+ #use Data::Dumper qw/ Dumper /;
+ #print Dumper(\@data);
Perhaps lose these. It is OK to keep the code live and hide it
behind --debug or something, but it seems to me that you are done
debugging it pretty much so...
+ use JSON;
Have this at the top, perhaps? It's not like this would let us
avoid loading JSON module when not doing codespeed (you need
'require' for that, right?).
+ print to_json(\@data, {utf8 => 1, pretty => 1}), "\n";
+}
+
binmode STDOUT, ":utf8" or die "PANIC on binmode: $!";
-print_default_results();
+if ($codespeed) {
+ print_codespeed_results($results_section);
+} else {
+ print_default_results();
+}