Hello, First of all, how are you doing your hits? If you use a browser, like Firefox, chances are that it will request favicon.ico at each requests, hence you'll see at least 2 hits.
Also, it's possible that a HEAD request is done before the real GET request, depends on the browser. For testing purposes, I strongly sugesst using curl to send exactly one request: $ curl -i http://0:3000/some_route Cheers, 2013/1/2 Rick Bragg <[email protected]> > Hi, > > I put a simple test in my before hook: > > hook 'before' => sub { > debug "Before Hook"; > }; > > and a couple of quick routes: > > #Home Page > get '/' => sub { template 'index'; }; > > #About Us page > get '/about-us' => sub { template 'about-us'; }; > > (I am also using Auth::Extensible) > > Whenever I hit the home page, I get 3 debug messages in a row in the log. > Whenever I hit the about-up page, I get 2 debug messages in a row in the > log. > > I thought that any kind of page hook would only be called once. Does > anybody know > why the before hook would ever be called more than once? > > Rick > > > > > > > > _______________________________________________ > dancer-users mailing list > [email protected] > http://lists.preshweb.co.uk/mailman/listinfo/dancer-users > >
_______________________________________________ dancer-users mailing list [email protected] http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
