Permalink
Browse files

Removed unnecessary before hook

  • Loading branch information...
1 parent 2034745 commit b1c4964c4648508838a5de64af1d36c7bf6e24e4 @ironcamel committed Apr 17, 2012
Showing with 3 additions and 10 deletions.
  1. +3 −10 lib/AtomBus.pm
View
@@ -10,16 +10,9 @@ $XML::Atom::DefaultVersion = '1.0';
# VERSION
set content_type => 'application/xml';
-
-my $deployed = 0;
-before sub {
- config->{plugins}{DBIC}{atombus} = config->{atombus}{db};
- config->{plugins}{DBIC}{atombus}{schema_class} = 'AtomBus::Schema';
- # Automagically create db if it doesn't exist.
- if (not $deployed++) {
- eval { schema->deploy }; # Fails gracefully if tables already exist.
- }
-};
+config->{plugins}{DBIC}{atombus} = config->{atombus}{db};
+config->{plugins}{DBIC}{atombus}{schema_class} = 'AtomBus::Schema';
+eval { schema->deploy }; # Fails gracefully if tables already exist.
get '/feeds/:feed_title/entries/:entry_id' => sub {
my $entry_id = 'urn:uuid:' . params->{entry_id};

0 comments on commit b1c4964

Please sign in to comment.