Permalink
Browse files

More compatibility

It is not that difficult, so, give a little more compatibility with
Log::Contextual.
  • Loading branch information...
1 parent c13656f commit 802423ac84449babf4d0295480d89d72d6091720 @ambs ambs committed Jul 31, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/Dancer/Plugin.pm
View
@@ -29,11 +29,11 @@ use vars qw(@EXPORT);
log_error
);
-sub log_core(&) { Dancer::Logger::core->($_[0]->()) }
-sub log_debug(&) { Dancer::Logger::debug->($_[0]->()) }
-sub log_info(&) { Dancer::Logger::info->($_[0]->()) }
-sub log_warning(&) { Dancer::Logger::warning->($_[0]->()) }
-sub log_error(&) { Dancer::Logger::error->($_[0]->()) }
+sub log_core(&@) { Dancer::Logger::core->( shift->(@_)); @_ }
+sub log_debug(&@) { Dancer::Logger::debug->( shift->(@_)); @_ }
+sub log_info(&@) { Dancer::Logger::info->( shift->(@_)); @_ }
+sub log_warning(&@) { Dancer::Logger::warning->(shift->(@_)); @_ }
+sub log_error(&@) { Dancer::Logger::error->( shift->(@_)); @_ }
sub register($&);

0 comments on commit 802423a

Please sign in to comment.