[dancer-users] Dancer 1 or Dancer 2?

Sawyer X xsawyerx at gmail.com
Fri Sep 12 13:35:48 BST 2014


Unfortunately that is a terrible example. The concept of blocking all
requests in a before() hook is... let's say, naive. In reality you would
like to simply block specific requests according to session, a la David
Golden's Auth::Tiny.

The before hooks are basically run on every request. Static files are now
served through the File handler. That means it will trigger the before
hooks because it's a normal request.
I would love to do it using the Static middleware, but then it will happen
before a route check on it, so we can't have that.

On Fri, Sep 12, 2014 at 11:21 AM, Kovács Dávid [ Davs ] <davserer at gmail.com>
wrote:

> One thing I've noticed is that in Dancer2 the before hooks are executed
> even on static files; that way
> https://metacpan.org/pod/distribution/Dancer/lib/Dancer/Cookbook.pod#Sessions-and-logging-in
> is not working at all, because if the user is not logged in, the static
> (css, js etc) files are not served. Back at the time that was one of the
> reasons I went with Dancer1 instead of Dancer2.
>
> On Fri, Sep 12, 2014 at 11:00 AM, VinceW <info at vincew.net> wrote:
>
>>  It was also mentioned in the discussion about the roadmap for D2
>>
>> Best,
>> VinceW
>>
>> On 09/12/2014 10:59 AM, Alexis Sukrieh wrote:
>>
>> 2014-09-12 10:39 GMT+02:00 Gabor Szabo <gabor at szabgab.com> <gabor at szabgab.com>:
>>
>>
>>  On Fri, Sep 12, 2014 at 11:18 AM, Sawyer X <xsawyerx at gmail.com> <xsawyerx at gmail.com> wrote:
>>
>>
>>  It depends on the features you want, and how much you're willing to put
>> up with. :)
>>
>> Dancer2 is still not fully stable. Things are changing. However, it has
>> some spiffier features and allows some things which weren't possible in D1.
>>
>>
>>
>>  Is there a comparison table between D1 and D2 ?
>>
>>
>>  ​That would be something very good to provide, indeed.
>>
>>
>>
>>
>>
>> _______________________________________________
>> dancer-users mailing listdancer-users at dancer.pmhttp://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>>
>>
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20140912/ae7d1df3/attachment.html>


More information about the dancer-users mailing list