Skip to content

Commit

Permalink
Removed unnecessary before hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ironcamel committed Apr 17, 2012
1 parent 2034745 commit b1c4964
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/AtomBus.pm
Expand Up @@ -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};
Expand Down

0 comments on commit b1c4964

Please sign in to comment.