@@ -21,7 +21,7 @@ my $location2 = File::Spec->rel2abs( path( dirname(__FILE__), 'config2' ) );
21
21
22
22
package Prod ;
23
23
use Moo;
24
- with ' Dancer2::Core::Role::ConfigReader ' ;
24
+ with ' Dancer2::Core::Role::Config ' ;
25
25
26
26
sub name {' Prod' }
27
27
@@ -31,31 +31,31 @@ my $location2 = File::Spec->rel2abs( path( dirname(__FILE__), 'config2' ) );
31
31
32
32
package Dev ;
33
33
use Moo;
34
- with ' Dancer2::Core::Role::ConfigReader ' ;
34
+ with ' Dancer2::Core::Role::Config ' ;
35
35
36
36
sub _build_environment {' development' }
37
37
sub _build_location {$location };
38
38
sub _build_default_config {$runner -> config}
39
39
40
40
package Failure ;
41
41
use Moo;
42
- with ' Dancer2::Core::Role::ConfigReader ' ;
42
+ with ' Dancer2::Core::Role::Config ' ;
43
43
44
44
sub _build_environment {' failure' }
45
45
sub _build_location {$location }
46
46
sub _build_default_config {$runner -> config}
47
47
48
48
package Staging ;
49
49
use Moo;
50
- with ' Dancer2::Core::Role::ConfigReader ' ;
50
+ with ' Dancer2::Core::Role::Config ' ;
51
51
52
52
sub _build_environment {' staging' }
53
53
sub _build_location {$location }
54
54
sub _build_default_config {$runner -> config}
55
55
56
56
package Merging ;
57
57
use Moo;
58
- with ' Dancer2::Core::Role::ConfigReader ' ;
58
+ with ' Dancer2::Core::Role::Config ' ;
59
59
60
60
sub name {' Merging' }
61
61
@@ -65,7 +65,7 @@ my $location2 = File::Spec->rel2abs( path( dirname(__FILE__), 'config2' ) );
65
65
66
66
package LocalConfig ;
67
67
use Moo;
68
- with ' Dancer2::Core::Role::ConfigReader ' ;
68
+ with ' Dancer2::Core::Role::Config ' ;
69
69
70
70
sub name {' LocalConfig' }
71
71
@@ -81,8 +81,8 @@ is_deeply $d->config_files,
81
81
" config_files() only sees existing files" ;
82
82
83
83
my $f = Prod-> new;
84
- is $f -> does(' Dancer2::Core::Role::ConfigReader ' ), 1,
85
- " role Dancer2::Core::Role::ConfigReader is consumed" ;
84
+ is $f -> does(' Dancer2::Core::Role::Config ' ), 1,
85
+ " role Dancer2::Core::Role::Config is consumed" ;
86
86
87
87
is_deeply $f -> config_files,
88
88
[ path( $location , ' config.yml' ),
0 commit comments