Tatsumaki 與 Twiggy 的搭配...

感謝 #perl.tw 上的幫助,總算是找到方法將 Tatsumaki 跑起來,而且把該拆開的地方拆開...

這是 app.psgi

use Controller::Main;
use Tatsumaki::Application;
use strict;
use warnings;

Tatsumaki::Application->new([
    '/' => 'Controller::Main',
]);

這是 Controller/Main.pm

package Controller::Main;

use parent qw/Tatsumaki::Handler/;
use strict;
use warnings;

sub get {
    my $self = shift;
    $self->write('It is Main Controller.');
}

然後直接用 twiggy 不加參數就可以跑起來..

Leave a Reply

Your email address will not be published. Required fields are marked *