You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: