Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

automagically get the right share dir

  • Loading branch information...
commit e272cde4c7da7688c326b535f19eda7c612057d5 1 parent 5004a46
Christian Walde authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/Web/Scenefinity.pm
7 lib/Web/Scenefinity.pm
View
@@ -11,16 +11,13 @@ package Web::Scenefinity;
use Web::Simple;
use Web::SimpleX::Helper::ActionWithRender qw' mm action ';
-use File::ShareDir 'dist_dir';
+use File::ShareDir::ProjectDistDir 'dist_dir';
use Text::Xslate;
use JSON qw' from_json to_json ';
use HTTP::Tiny;
use Data::Dumper;
use List::Util qw( shuffle );
-sub share_dir {
- eval { dist_dir( "Web-Scenefinity" ) } || "../share/";
-}
sub dispatch_request {
(
@@ -69,7 +66,7 @@ sub youtube_js { ["youtube.js"] }
sub render_Xslate {
my ( $self, $result ) = @_;
- my $content = Text::Xslate->new( path => $self->share_dir )->render( @{$result} );
+ my $content = Text::Xslate->new( path => dist_dir( "Web-Scenefinity" ) )->render( @{$result} );
[ 200, [ "Content-Type" => "text/html; charset=utf-8" ], [$content], ];
}
Please sign in to comment.
Something went wrong with that request. Please try again.