Index: trunk/lib/Bookmarks.pm
===================================================================
--- trunk/lib/Bookmarks.pm	(revision 91)
+++ trunk/lib/Bookmarks.pm	(revision 92)
@@ -39,6 +39,6 @@
     my $self = shift;
     require File::Slurp;
-    require FindBin;
-    my $table_definitions = File::Slurp::read_file("$FindBin::RealBin/bookmarks.sql");
+    require File::Basename;
+    my $table_definitions = File::Slurp::read_file(File::Basename::dirname($INC{'Bookmarks.pm'}) . "/../bookmarks.sql");
     $self->dbh->{sqlite_allow_multiple_statements} = 1;
     $self->dbh->do($table_definitions);
Index: trunk/lib/BookmarksApp.pm
===================================================================
--- trunk/lib/BookmarksApp.pm	(revision 91)
+++ trunk/lib/BookmarksApp.pm	(revision 92)
@@ -17,8 +17,16 @@
     my $self = shift;
 
-    -e $self->config_file or die "Config file " . $self->config_file . " not found\n";
+    my $config = $self->config;
 
-    my $config = YAML::LoadFile($self->config_file);
-    $self->config($config);
+    # if the config_file is set, try to load the config from there
+    # note that currently, if there is a config_file and a config,
+    # all of the values in config are ignored in favor of those in
+    # the config_file
+    if ($self->config_file) {
+        -e $self->config_file or die "Config file " . $self->config_file . " not found\n";
+        $config = YAML::LoadFile($self->config_file);
+        #TODO: merge the configs instead of overwriting?
+        $self->config($config);
+    }
 
     my $router = router {
@@ -75,5 +83,6 @@
     $self->_app(
         builder {
-            enable_if { $_[0]->{REMOTE_ADDR} eq $config->{proxy_ip} } 'ReverseProxy';
+            enable_if { $_[0]->{REMOTE_ADDR} eq $config->{proxy_ip} } 'ReverseProxy'
+                if $config->{proxy_ip};
             enable_if { $_[0]->{REQUEST_METHOD} ne 'GET' } 'Auth::Digest', (
                 realm           => 'Bookmarks',
@@ -81,5 +90,5 @@
                 password_hashed => 1,
                 authenticator   => sub { $config->{digest_password} }
-            );
+            ) if $config->{auth};
             sub { $router->dispatch(shift); };
         }
