Created
December 18, 2011 12:08
-
-
Save inish777/1493187 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Dancer/Plugin.pm b/lib/Dancer/Plugin.pm | |
index cc51cb0..128209d 100644 | |
--- a/lib/Dancer/Plugin.pm | |
+++ b/lib/Dancer/Plugin.pm | |
@@ -96,7 +96,7 @@ sub register { | |
sub register_plugin { | |
my $plugin = caller; | |
my $caller = caller(1); | |
- my $dsl = $caller->dsl; | |
+ #my $dsl = $caller->dsl; | |
Moo::Role->apply_role_to_package($plugin, 'Dancer::Core::Role::DSL'); | |
@@ -106,11 +106,11 @@ sub register_plugin { | |
no strict 'refs'; | |
*{"${plugin}::${keyword}"} = $code; | |
} | |
- $dsl->register($keyword, $is_global); | |
+ #$dsl->register($keyword, $is_global); | |
} | |
- | |
- Moo::Role->apply_roles_to_object($dsl, $plugin); | |
- $dsl->export_symbols_to($caller); | |
+ | |
+ #Moo::Role->apply_roles_to_object($dsl, $plugin); | |
+ #$dsl->export_symbols_to($caller); | |
} | |
sub plugin_setting { | |
diff --git a/lib/Dancer/Plugin/Ajax.pm b/lib/Dancer/Plugin/Ajax.pm | |
index b41077a..00c5eb1 100644 | |
--- a/lib/Dancer/Plugin/Ajax.pm | |
+++ b/lib/Dancer/Plugin/Ajax.pm | |
@@ -3,6 +3,7 @@ package Dancer::Plugin::Ajax; | |
use strict; | |
use warnings; | |
+use Dancer ':syntax'; | |
use Dancer::Plugin; | |
hook 'before' => sub { | |
diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm | |
index 77158f8..5a4ab16 100644 | |
--- a/t/lib/TestApp.pm | |
+++ b/t/lib/TestApp.pm | |
@@ -12,7 +12,7 @@ set 'default_mime_type' => 'text/bar'; | |
get '/' => sub { app->name }; | |
# /haltme should bounce to / | |
-before sub { | |
+hook 'before' => sub { | |
if (request->path_info eq '/haltme') { | |
redirect '/'; | |
halt; | |
@@ -20,7 +20,7 @@ before sub { | |
}; | |
get '/haltme' => sub { "should not be there" }; | |
-after sub { | |
+hook after => sub { | |
my $response = shift; | |
if (request->path_info eq '/rewrite_me') { | |
$response->content("rewritten!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment