Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from oddesey/master

Lemonade Dancer Plugin Base
  • Loading branch information...
commit a647f3971e340b47d2232200cba3bb5a05a12886 2 parents 6edd49e + d2e7bda
@R3hash R3hash authored
Showing with 44 additions and 0 deletions.
  1. +44 −0 Lemonade.pm
View
44 Lemonade.pm
@@ -0,0 +1,44 @@
+package Dancer::Plugin::Lemonade;
+use strict;
+use warnings;
+
+use Lemonade::Base;
+
+
+use Dancer ':syntax';
+use Dancer::Plugin;
+
+=head1 NAME
+
+Dancer::Plugin::Lemonade - LemonadeStand Plugin for Dancer
+
+=head1 VERSION
+
+Version 0.1
+
+=cut
+
+our $VERSION = '0.1';
+
+=head1 lemonade
+
+Register lemonade keyword
+in dancer namespace.
+
+=cut
+register lemonade => sub {
+
+ vars->{lemonade} = Lemonade::Base->new();
+ return vars->{lemonade};
+};
+
+
+#confirm plugin is working
+hook 'before' => sub {
+ debug vars->{lemonade};
+ debug 'hit before sub'
+};
+
+register_plugin;
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.