{"id":15408514,"url":"https://github.com/yusukebe/hitagi","last_synced_at":"2025-09-04T15:34:43.922Z","repository":{"id":66623562,"uuid":"571775","full_name":"yusukebe/Hitagi","owner":"yusukebe","description":"Shall we talk about stars and micro web application frameworks.","archived":false,"fork":false,"pushed_at":"2010-03-24T07:33:23.000Z","size":119,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T08:15:08.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yusukebe.png","metadata":{"files":{"readme":"README.mkdn","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-03-20T20:38:01.000Z","updated_at":"2019-08-13T14:32:11.000Z","dependencies_parsed_at":"2023-02-20T07:45:26.083Z","dependency_job_id":null,"html_url":"https://github.com/yusukebe/Hitagi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yusukebe/Hitagi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2FHitagi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2FHitagi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2FHitagi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2FHitagi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusukebe","download_url":"https://codeload.github.com/yusukebe/Hitagi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusukebe%2FHitagi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273631556,"owners_count":25140627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:34:20.562Z","updated_at":"2025-09-04T15:34:43.891Z","avatar_url":"https://github.com/yusukebe.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hitagi\n\n\u003e Shall we talk about stars and micro web application frameworks.\n\n## SYNOPSIS\n\nWrite as\n\n    use Hitagi;\n    get '/' =\u003e sub { 'Hello' };\n    star;\n\nRun it\n\n    $ perl myapp.pl\n\nView at http://localhost:5000\n\n## DESCRIPTION\n\nHitagi is yet another micro web application framework\nusing Plack::Request, Router::Simple, Text::MicroTemplate, and DBIx::Skinny.\n\n### EXAMPLE\n\n#### Using template in DATA section.\n\nTemplate format is as Text::MicroTemplate.\n\n    use Hitagi;\n    get '/' =\u003e 'index';\n    star;\n\n    __DATA__\n\n    @@ index\n    \u003ch1\u003ewelcome\u003c/h1\u003e\n\n#### Get params and give args to template\n\n    use Hitag;\n    get '/hi' =\u003e sub {\n        my ($req) = @_;\n        render( 'hi.mt',\n            { message =\u003e $req-\u003eparam('message') || 'no message' } );\n    };\n    star;\n\n    __DATA__\n\n    @@ hi\n    \u003ch1\u003emessage : \u003c?= $message ?\u003e\u003c/h1\u003e\n\n#### Handle post request and parse params from url path\n\n    post '/comment/:id' =\u003e sub {\n        my ( $req, $args ) = @_;\n        warn \"Comment id is : $args-\u003e{id}\";\n        ...;\n    };\n\n#### Handle static files\n\nPut your css or image files etc. to \"static\" directory.\nYou can access these files on http://localhost:5000/static/xxx.css\n\n#### Make custom response such as XML\n\nres method returns Plack::Response.\n\n    get '/xml' =\u003e sub {\n        my $res = res(200);\n        $res-\u003econtent_type('application/xml');\n        $res-\u003ebody( template('xml') );\n        $res-\u003efinalize;\n    };\n\n    ...;\n\n    __DATA__\n\n    @xml\n    \u003cxml\u003e\u003croot\u003econtent\u003c/root\u003e\u003c/xml\u003e\n\n#### Template layout setting\n\n    use Hitagi;\n\n    ...;\n\n    __DATA__\n    @@ index\n    \u003ch1\u003ewelcome\u003c/h1\u003e\n\n    @@ layout\n    \u003chtml\u003e\n    \u003c/head\u003e\u003ctitle\u003etitle\u003c/title\u003e\u003c/head\u003e\n    \u003cbody\u003e\n    \u003cdiv id=\"container\"\u003e\n        \u003c?= content ?\u003e\n    \u003c/div\u003e\n    \u003caddress\u003eThis content is made by Hitagi\u003c/address\u003e\n    \u003c/body\u003e\n    \u003c/html\u003e\n\n#### Model\n\nDBIx::Skinny based.\n\n    use Hitagi;\n\n    set db =\u003e {\n        connect_info =\u003e [ 'dbi:SQLite:','', '' ],\n        schema       =\u003e qq{\n            install_table entry =\u003e schema {\n               pk 'id';\n               columns qw/id body/;\n            };\n        }\n    };\n\n    db-\u003edo(q{CREATE TABLE entry ( id varchar, body text )});\n\n    ...;\n\n    get '/entry/{entry_id}' =\u003e sub {\n        my ( $req, $args ) = @_;\n        my $entry_id = $args-\u003e{entry_id};\n        my $entry = db-\u003esingle( entry =\u003e { id =\u003e $entry_id, } );\n        return res(404,[],'Not Found')-\u003efinalize unless $entry;\n        render( 'entry', { body =\u003e $entry-\u003ebody } );\n    };\n\n## Run as CGI, PSGI.\n\nIf you save a application file with '.cgi' extention, it works as CGI.\n\n/home/user/public_html/hello.cgi\n\n    #!/usr/bin/perl\n\n    use Hitagi;\n    get '/' =\u003e sub { render( 'index', { message =\u003e 'Hi' } ) };\n    star;\n\n    __DATA__\n    @@ index\n    \u003ch1\u003emessage : \u003c?= $message ?\u003e\u003c/h1\u003e\n\nView http://localhost/~user/hello.cgi/\n\nPSGI supported too.\n\n    $ plackup myapp.pl\n\n## SEE ALSO\n\n- Plack::Request\n- Plack::Response\n- Text::MicroTemplate\n- DBIx::Skinny\n- Router::Simple\n- Data::Section::Simple\n\n## AUTHOR\n\nYusuke Wada ( aka yusukebe )\n\n****\n\nCurrently, Hitagi is not CPAN module.\n\n## INSTALLATION\n\nHitagi installation is straightforward. If your CPAN shell is set up,\nyou should just be able to do\n\n    % cpan Hitagi\n\nDownload it, unpack it, then build it as per the usual:\n\n    % perl Makefile.PL\n    % make \u0026\u0026 make test\n\nThen install it:\n\n    % make install\n\n## DOCUMENTATION\n\nHitagi documentation is available as in POD. So you can do:\n\n    % perldoc Hitagi\n\nto read the documentation online with your favorite pager.\n\nYusuke Wada\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusukebe%2Fhitagi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusukebe%2Fhitagi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusukebe%2Fhitagi/lists"}