From: Tim Bunce Date: Wed, 17 Oct 2012 09:46:25 +0000 (+0100) Subject: fix bin/sizeme_graph.pl for older Mojolicious versions RT80195 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b48d53b9818422a87b3e5eef4efed2af633aa6da;p=p5sagit%2FDevel-Size.git fix bin/sizeme_graph.pl for older Mojolicious versions RT80195 --- diff --git a/bin/sizeme_graph.pl b/bin/sizeme_graph.pl index 71aa792..4cba689 100755 --- a/bin/sizeme_graph.pl +++ b/bin/sizeme_graph.pl @@ -89,7 +89,11 @@ ORLite->import({ 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; +if ( $Mojolicious::VERSION >= 2.49 ) { + push @{ app->static->paths }, $static_dir; +} else { + app->static->root($static_dir); +} # Documentation browser under "/perldoc"