From: Tim Bunce Date: Tue, 2 Oct 2012 21:38:58 +0000 (+0100) Subject: Move sizeme_graph.pl to bin and the static files into lib so they're installed. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e610a166988da4ed34d8c0e2e4e8ab0616aab237;p=p5sagit%2FDevel-Size.git Move sizeme_graph.pl to bin and the static files into lib so they're installed. --- diff --git a/Makefile.PL b/Makefile.PL index 53de44f..913270c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -28,7 +28,7 @@ WriteMakefile( XSLoader => 0, ORLite => 0, }, - EXE_FILES => [ 'bin/sizeme_store.pl' ], + EXE_FILES => [ 'bin/sizeme_store.pl', 'bin/sizeme_graph.pl' ], clean => { FILES => 'refcounted_he.h', }, diff --git a/static/sizeme_graph.pl b/bin/sizeme_graph.pl similarity index 97% rename from static/sizeme_graph.pl rename to bin/sizeme_graph.pl index 9199141..927e989 100755 --- a/static/sizeme_graph.pl +++ b/bin/sizeme_graph.pl @@ -8,6 +8,7 @@ use JSON::XS; use Getopt::Long; use Storable qw(dclone); use Devel::Dwarn; +use Devel::SizeMe::Graph; require ORLite; @@ -52,6 +53,11 @@ ORLite->import({ #unicode => 1, # XXX }); +my $static_dir = $INC{'Devel/SizeMe/Graph.pm'} or die 'panic'; +$static_dir =~ s:\.pm$:/static:; +die "panic $static_dir" unless -d $static_dir; +push @{ app->static->paths}, $static_dir; + # Documentation browser under "/perldoc" plugin 'PODRenderer'; diff --git a/lib/Devel/SizeMe/Graph.pm b/lib/Devel/SizeMe/Graph.pm new file mode 100644 index 0000000..c843363 --- /dev/null +++ b/lib/Devel/SizeMe/Graph.pm @@ -0,0 +1,3 @@ +package Devel::SizeMe::Graph; + +1; diff --git a/static/public/css/Treemap.css b/lib/Devel/SizeMe/Graph/static/css/Treemap.css similarity index 100% rename from static/public/css/Treemap.css rename to lib/Devel/SizeMe/Graph/static/css/Treemap.css diff --git a/static/public/css/base.css b/lib/Devel/SizeMe/Graph/static/css/base.css similarity index 100% rename from static/public/css/base.css rename to lib/Devel/SizeMe/Graph/static/css/base.css diff --git a/static/public/excanvas.js b/lib/Devel/SizeMe/Graph/static/excanvas.js similarity index 100% rename from static/public/excanvas.js rename to lib/Devel/SizeMe/Graph/static/excanvas.js diff --git a/static/public/jit-yc.js b/lib/Devel/SizeMe/Graph/static/jit-yc.js similarity index 100% rename from static/public/jit-yc.js rename to lib/Devel/SizeMe/Graph/static/jit-yc.js diff --git a/static/public/jit.js b/lib/Devel/SizeMe/Graph/static/jit.js similarity index 100% rename from static/public/jit.js rename to lib/Devel/SizeMe/Graph/static/jit.js diff --git a/static/public/jquery-1.8.1-min.js b/lib/Devel/SizeMe/Graph/static/jquery-1.8.1-min.js similarity index 100% rename from static/public/jquery-1.8.1-min.js rename to lib/Devel/SizeMe/Graph/static/jquery-1.8.1-min.js diff --git a/static/public/sprintf.js b/lib/Devel/SizeMe/Graph/static/sprintf.js similarity index 100% rename from static/public/sprintf.js rename to lib/Devel/SizeMe/Graph/static/sprintf.js diff --git a/static/public/treemap.js b/lib/Devel/SizeMe/Graph/static/treemap.js similarity index 100% rename from static/public/treemap.js rename to lib/Devel/SizeMe/Graph/static/treemap.js diff --git a/static/public/css/col1.png b/static/public/css/col1.png deleted file mode 100644 index 7ab008f..0000000 Binary files a/static/public/css/col1.png and /dev/null differ diff --git a/static/public/css/col2.png b/static/public/css/col2.png deleted file mode 100644 index c0d3891..0000000 Binary files a/static/public/css/col2.png and /dev/null differ diff --git a/static/public/css/gradient.png b/static/public/css/gradient.png deleted file mode 100644 index e283966..0000000 Binary files a/static/public/css/gradient.png and /dev/null differ