File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,14 @@ use FindBin;
4
4
use Cwd;
5
5
use lib " $FindBin::Bin /lib" ;
6
6
use Mojolicious::Lite;
7
- use Mojo::Util qw( md5_sum spurt) ;
7
+ use Mojo::Util qw( md5_sum) ;
8
+ use Mojo::File qw( path) ;
9
+ use Mojo::Home;
8
10
use Mojo::Loader qw( data_section) ;
9
11
use Bootylicious;
10
12
use Bootylicious::Timestamp;
11
13
12
- app-> home-> parse ($ENV {BOOTYLICIOUS_HOME } || getcwd());
14
+ app-> home(Mojo::Home -> new ($ENV {BOOTYLICIOUS_HOME } || getcwd() ));
13
15
14
16
unshift @{app-> plugins-> namespaces}, ' Bootylicious::Plugin' ;
15
17
@@ -25,7 +27,7 @@ if (@ARGV && $ARGV[0] eq '--create-config') {
25
27
die " bootylicious.conf already exists\n " ;
26
28
}
27
29
28
- spurt(data_section( __PACKAGE__ , ' bootylicious.conf' ), ' bootylicious.conf' );
30
+ path( ' bootylicious.conf' )-> spurt(data_section( __PACKAGE__ , ' bootylicious.conf' ) );
29
31
exit ;
30
32
}
31
33
Original file line number Diff line number Diff line change @@ -62,11 +62,11 @@ sub register {
62
62
$ENV {LC_ALL } = ' C' ;
63
63
64
64
# set proper templates base dir, if defined
65
- push @{$app -> renderer-> paths}, $app -> home-> rel_dir ($config -> {templates_directory })
65
+ push @{$app -> renderer-> paths}, $app -> home-> rel_file ($config -> {templates_directory })
66
66
if defined $config -> {templates_directory };
67
67
68
68
# set proper public base dir, if defined
69
- push @{$app -> static-> paths}, $app -> home-> rel_dir ($config -> {public_directory })
69
+ push @{$app -> static-> paths}, $app -> home-> rel_file ($config -> {public_directory })
70
70
if defined $config -> {public_directory };
71
71
72
72
$app -> defaults(title => ' ' , description => ' ' , layout => ' wrapper' );
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ sub register {
280
280
my $option = $config -> {" ${name} _directory" } || ' ' ;
281
281
$app -> helper(
282
282
" ${name} _root" => sub {
283
- ($option =~ m / ^\/ / ) ? $option : $app -> home-> rel_dir ($option );
283
+ ($option =~ m / ^\/ / ) ? $option : $app -> home-> rel_file ($option );
284
284
}
285
285
);
286
286
}
You can’t perform that action at this time.
0 commit comments