Universal #32

Merged
merged 10 commits into from Aug 14, 2012

Conversation

Projects
None yet
2 participants
@ambs
Collaborator

ambs commented Jul 24, 2012

Dancer 2 ready, I would say.

lib/Dancer/Plugin/Database.pm
+ Dancer::Factory::Hook->instance->install_hooks(@dpd_hooks);
+} else {
+ register_hook(@dpd_hooks);
+}

This comment has been minimized.

@bigpresh

bigpresh Jul 24, 2012

Owner

It might make sense to have an $install_hooks coderef which knows how to register hooks depending on the Dancer version, in much the same way as the cunningly named $hooker.

@bigpresh

bigpresh Jul 24, 2012

Owner

It might make sense to have an $install_hooks coderef which knows how to register hooks depending on the Dancer version, in much the same way as the cunningly named $hooker.

lib/Dancer/Plugin/Database.pm
+ Dancer::Config->import();
+
+ $logger = sub { Dancer::Logger->can($_[0])->($_[1]) };
+ $hooker = sub { Dancer::Factory::Hook->instance->execute_hooks(@_) };

This comment has been minimized.

@bigpresh

bigpresh Jul 24, 2012

Owner

Whist the name amuses me, I think that should probably be $execute_hooks or similar, and a similar $register_hooks could also be provided (see the other note further down)

@bigpresh

bigpresh Jul 24, 2012

Owner

Whist the name amuses me, I think that should probably be $execute_hooks or similar, and a similar $register_hooks could also be provided (see the other note further down)

bigpresh added a commit that referenced this pull request Aug 14, 2012

@bigpresh bigpresh merged commit 9f0f8f1 into master Aug 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment