Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kelp::Test doesn't read config properly #6

Closed
vfilatov opened this issue May 22, 2013 · 1 comment
Closed

Kelp::Test doesn't read config properly #6

vfilatov opened this issue May 22, 2013 · 1 comment
Assignees

Comments

@vfilatov
Copy link

# create an app
$ Kelp myTest

# add a line to conf/config.pl
myTest       => 'here is my Test',

$ cat lib/myTest.pm
package myTest;
use Kelp::Base 'Kelp';

sub build {
    my $self = shift;
    my $r    = $self->routes;
    $r->add( '/home', 'home' );
    $r->add( '/config', sub { $_[0]->config_hash } );
my $msg = $self->config( 'myTest' );
print "===\n$msg\n===\n";
}

sub home {
    my $self = shift;
    $self->template('home');
}

1;

$  plackup app.psgi 
===
here is my Test
===
$ perl -Ilib t/main.t 
Use of uninitialized value $msg in concatenation (.) or string at lib/myTest.pm line 10.
===

===
# GET /home
ok 1 - Response code is 200
ok 2 - Content-Type is 'text/html'
ok 3 - Content matches (?-xism:Hello, world!)
1..3
@ghost ghost assigned sgnix May 22, 2013
@sgnix
Copy link
Collaborator

sgnix commented May 22, 2013

Yes, it's a bug. It's caused by a typo in the config search paths. This bug only affects tests.
A fix is coming this Friday.

sgnix pushed a commit that referenced this issue May 24, 2013
@sgnix sgnix closed this as completed May 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants