Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More compatibility

It is not that difficult, so, give a little more compatibility with
Log::Contextual.
  • Loading branch information...
commit 802423ac84449babf4d0295480d89d72d6091720 1 parent c13656f
@ambs ambs authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/Dancer/Plugin.pm
View
10 lib/Dancer/Plugin.pm
@@ -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($&);
Please sign in to comment.
Something went wrong with that request. Please try again.