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.
+ * Applied some polish to the docs.
+
0.02 2012-10-02 Tim Bunce
* Renamed to Devel::SizeMe.
'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,
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 $!;
}
/*ADD_SIZE(st, strlen(SvANY(baseregex)->subbeg));*/
#endif
if (st->go_yell && !st->regex_whine) {
- carp("Devel::Size: Calculated sizes for compiled regexes are incompatible, and probably always will be");
+ carp("Devel::Size: Calculated sizes for compiled regexes are incomplete");
st->regex_whine = 1;
}
}
#!/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
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.
app->start;
+{ # just to reserve the namespace for future use
+ package Devel::SizeMe::Graph;
+ 1;
+}
+
__DATA__
@@ index.html.ep
% layout 'default';
require Exporter;
require XSLoader;
-$VERSION = '0.03';
+$VERSION = '0.04';
@ISA = qw(Exporter);
@EXPORT_OK = qw(size total_size perl_size heap_size);
/);
die ("Uhoh, test uses an outdated version of Devel::SizeMe")
- unless is ($Devel::SizeMe::VERSION, '0.03', 'VERSION MATCHES');
+ unless is ($Devel::SizeMe::VERSION, '0.04', 'VERSION MATCHES');
#############################################################################
# some basic checks: