From: Tim Bunce Date: Fri, 5 Oct 2012 16:48:30 +0000 (+0100) Subject: Removed Mojolicious::Lite as a prerequisite as it was stoping people installing on 5.8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d2b08ed7d599a7333f1dffe21e7b9ab1c0ca575;p=p5sagit%2FDevel-Size.git Removed Mojolicious::Lite as a prerequisite as it was stoping people installing on 5.8 --- diff --git a/CHANGES b/CHANGES index 8603b14..a627e2e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,10 @@ Revision history for Perl extension Devel::SizeMe. +0.04 2012-10-05 Tim Bunce + + * Removed Mojolicious::Lite as a prerequisite as it was stoping people + using SizeMe with perl 5.8. + 0.03 2012-10-04 Tim Bunce * Fixup logic and tests to be portable across more perl versions. diff --git a/Makefile.PL b/Makefile.PL index 913270c..679218b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -23,7 +23,9 @@ WriteMakefile( 'Test::More' => 0, 'JSON::XS' => 0, 'HTML::Entities' => 0, - 'Mojolicious::Lite' => 0, + # Removed for now as it stops people using SizeMe with 5.8 + # sizeme_graph.pl will eventually become a separate module + #'Mojolicious::Lite' => 0, 'Devel::Dwarn' => 0, XSLoader => 0, ORLite => 0, @@ -58,7 +60,7 @@ sub write_header { open my $fh, '>', $filename or die $!; print { $fh } "#ifndef ${guard_name}\n"; print { $fh } "#define ${guard_name}\n"; - print { $fh } $contents or die $!; + print { $fh } $contents if defined $contents; print { $fh } "#endif /* ${guard_name} */\n"; close $fh or die $!; } diff --git a/bin/sizeme_graph.pl b/bin/sizeme_graph.pl index 8eef472..b8530d6 100755 --- a/bin/sizeme_graph.pl +++ b/bin/sizeme_graph.pl @@ -1,5 +1,15 @@ #!/usr/bin/env perl +BEGIN { + die qq{$0 requires Mojolicious::Lite, which isn't installed. + + Currently requires Mojolicious::Lite which isn't available for perl 5.8. + If this affects you you can run Devel::SizeMe with your normal perl and + run sizeme_graph.pl with a different perl, perhaps on a different machine. + \n} + unless eval "require Mojolicious::Lite"; +} + =head1 NAME sizeme_graph.pl - web server providing an interactive treemap of Devel::SizeMe data @@ -17,6 +27,10 @@ Then open a web browser on http://127.0.0.1:3000 Reads a database created by sizeme_store.pl and provides a web interface with an interactive treemap of the data. +Currently requires Mojolicious::Lite which isn't available for perl 5.8. +If this affects you you can run Devel::SizeMe with your normal perl and +run sizeme_graph.pl with a different perl, perhaps on a different machine. + =head2 TODO Current implementation is all very alpha and rather hackish. @@ -217,6 +231,11 @@ sub _transform_node_tree { # recurse depth first app->start; +{ # just to reserve the namespace for future use + package Devel::SizeMe::Graph; + 1; +} + __DATA__ @@ index.html.ep % layout 'default';