[dancer-users] Re : Re : Re : Before Hook hit multiple times.

Damien Krotkine dkrotkine at gmail.com
Fri Jan 4 15:08:58 GMT 2013



Le vendredi 4 janvier 2013 à 14:57, Alexis Sukrieh a écrit :

> > On 4 Jan 2013 13:21, "Damien Krotkine" <dkrotkine at gmail.com (mailto:dkrotkine at gmail.com)> wrote:
> > >  
> > > And that brings up the fact that we should use a serious tool to handle dancer 'use' options. Can we try an enhanced sub::exporter or similar?
> > >  
> > >  
> > >  
> >  
> >  
> >  
> >  
>  
> I doubt this is an exporter issue actually, but rather an object-encapsulation problem, so I'm not sure opening a new work area about Sub::Exporter is what we want. On top of introducing another core-dep, we're going to diverge, I fear. I may be wrong, but that's my feeling.  
>  
>  
>  


Sorry I answered the other message before seeing this one.  

Yes I agree it's a different topic. I was just thinking out loud. What mean is that  if we need to handle :

use Dancer;
use Dancer qw(:moose);
use Dancer qw( :syntax :test);
Use Dancer dsl => 'My::DSL', scope => 'Parent', ':moose'

then maybe we can rely on existing mechanism. Maybe not a new dependency, but at least get inspired and maybe steal the syntax of existing stuff

>  
> The exporting of symbols done by the DSL role works pretty well, not sure we want to spend energy on changing something that works.

Yes definitely, see my other email  
>  
>  
> The main deal here is to be able to tell Dancer to compose a set of packages into one Dancer::Core::App object, for the caller. Or if we do it like you say, from a sub-app to a parent app. And after thinking about it, I don't think both ways are exclusive.

That's true actually, we could do both. Now the hard thing is to find the right syntax :)  
>  
> Once we have that, we should be in a very good position for implementing the option David is speaking about:  
>  
>   scope: single # the D1 way
>  
> Or
>  
>   scope: per_app # the current D2 way

maybe per_package ?   
>  
> Of course, there may be better names but you get the idea. I think we have something there, combining all the comments in this thread.

Fully agree. Productive thread :)  

  
>  
>  
> _______________________________________________
> 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/20130104/3756962f/attachment.htm>


More information about the dancer-users mailing list