Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[URI::Dispatcher] new module

Meant to replace Routes.
  • Loading branch information...
commit 62501158e50a53726ba36ceb46e7ac05fff3242c 1 parent 826f334
@masak authored
Showing with 20 additions and 0 deletions.
  1. +7 −0 lib/URI/Dispatcher.pm
  2. +13 −0 t/uri-dispatcher/01-literal.t
View
7 lib/URI/Dispatcher.pm
@@ -0,0 +1,7 @@
+use v6;
+
+class URI::Dispatcher {
+ method dispatch($url) {
+ return True;
+ }
+}
View
13 t/uri-dispatcher/01-literal.t
@@ -0,0 +1,13 @@
+use v6;
+
+use Test;
+
+use URI::Dispatcher;
+
+{
+ my $d = URI::Dispatcher.new(
+ '/' => {}
+ );
+
+ ok $d.dispatch('/'), 'can dispatch on provided literal URL';
+}
Please sign in to comment.
Something went wrong with that request. Please try again.