Revision: 992 Author: tim.bunce Date: Tue Dec 22 14:56:03 2009 Log: Don't build an unusable treemap if JSON::Any not install. Give reader a hint.
M bin/nytprofhtml http://code.google.com/p/perl-devel-nytprof/source/detail?r=992 Modified: /trunk/bin/nytprofhtml ======================================= --- /trunk/bin/nytprofhtml Tue Dec 22 14:40:21 2009 +++ /trunk/bin/nytprofhtml Tue Dec 22 14:56:03 2009 @@ -582,9 +582,14 @@ }, "index-subs-excl.html", $all_subs; } - output_subs_treemap_page($reporter, "subs-treemap-excl.html", - "Subroutine Exclusive Time Treemap", sub { shift->excl_time }); - print $fh q{<br/>You can view subroutines in a treemap of <a href="subs-treemap-excl.html">exclusive time</a>, grouped by package.<br/>}; + if ($json_any) { + output_subs_treemap_page($reporter, "subs-treemap-excl.html", + "Subroutine Exclusive Time Treemap", sub { shift->excl_time }); + print $fh q{<br/>You can view subroutines in a treemap of <a href="subs-treemap-excl.html">exclusive time</a>, grouped by package.<br/>}; + } + else { + print $fh q{<br/>(Can't create visual treemap of subroutine exclusive times without the <a href="http://search.cpan.org/dist/JSON-Any/">JSON::Any</a> module.)<br/>}; + } output_subs_callgraph_dot_file($reporter, "packages-callgraph.dot", undef, 1); print $fh q{<br/>NYTProf also generates call-graph files in } -- You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected]
