{"id":16447200,"url":"https://github.com/junekelly/perl6-http-router-blind","last_synced_at":"2026-03-04T11:01:11.436Z","repository":{"id":145904324,"uuid":"44395504","full_name":"JuneKelly/perl6-http-router-blind","owner":"JuneKelly","description":"A simple HTTP Router for Perl6","archived":false,"fork":false,"pushed_at":"2017-04-29T16:30:31.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T11:36:10.023Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl6","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuneKelly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-16T15:55:50.000Z","updated_at":"2016-10-27T08:28:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f0ff559-5acc-4e2f-ae0c-c0a4bfc326a0","html_url":"https://github.com/JuneKelly/perl6-http-router-blind","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JuneKelly/perl6-http-router-blind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fperl6-http-router-blind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fperl6-http-router-blind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fperl6-http-router-blind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fperl6-http-router-blind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuneKelly","download_url":"https://codeload.github.com/JuneKelly/perl6-http-router-blind/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fperl6-http-router-blind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30078405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11T09:50:01.225Z","updated_at":"2026-03-04T11:01:11.418Z","avatar_url":"https://github.com/JuneKelly.png","language":"Perl6","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP::Router::Blind\n\nA simple, framework-agnostic HTTP Router for Perl6\n\n[![Build Status](https://travis-ci.org/ShaneKilkelly/perl6-http-router-blind.svg?branch=master)](https://travis-ci.org/ShaneKilkelly/perl6-http-router-blind)\n\n## Example\n\nWith the HTTP::Easy server:\n```perl6\nuse v6;\nuse HTTP::Easy::PSGI;\nuse HTTP::Router::Blind;\n\nmy $http = HTTP::Easy::PSGI.new(:port(8080));\nmy $router = HTTP::Router::Blind.new();\n\n# simple string-match route\n$router.get(\"/\", sub (%env) {\n    [200, ['Content-Type' =\u003e 'text/plain'], [\"Home is where the heart is\"]]\n});\n\n$router.get(\"/about\", sub (%env) {\n    [200, ['Content-Type' =\u003e 'text/plain'], [\"About this site\"]]\n});\n\n# string match with keyword params,\n# the second parameter to the handler function is a hash of params\n# extracted from the URL\n$router.get(\"/user/:id\", sub (%env, %params) {\n    my $user-id = %params\u003cid\u003e;\n    [200, ['Content-Type' =\u003e 'text/plain'], [\"It's user $user-id\"]]\n});\n\n# regex match, with named capture-group,\n# will match a request like '/items/42253',\n# the second parameter to the handler is the Regex match object;\n$router.get(/\\/items\\/$\u003cid\u003e=(.*)/, sub (%env, $params) {\n    my $id = $params\u003cid\u003e;\n    [200, ['Content-Type' =\u003e 'text/plain'], [\"got request for item $id\"]]\n});\n\n# you can pass multiple handler functions\n# which will be chained together in order\nsub do-something-special (%env) { ...; return %env; }\n$router.get('/secret', \u0026do-something-special, sub (%env) {\n    [200, ['Content-Type' =\u003e 'text/plain'], [\"it's a secret\"]]\n});\n\n# in our app function, we just call $router.dispatch\nmy $app = sub (%env) {\n    $router.dispatch(%env\u003cREQUEST_METHOD\u003e, %env\u003cREQUEST_URI\u003e, %env);\n};\n\n$http.handle($app);\n```\n\n# CHANGELOG\n\n- 2.0.0 : for keyword and regex matches, pass the matched `params` as a second\nparameter to the handler function, instead of setting `%env\u003cparams\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunekelly%2Fperl6-http-router-blind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunekelly%2Fperl6-http-router-blind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunekelly%2Fperl6-http-router-blind/lists"}