[dancer-users] Confused about types and globals

Warren Young warren at etr-usa.com
Thu Jan 23 15:54:14 GMT 2014


On 1/23/2014 07:58, David Golden wrote:
> On Thu, Jan 23, 2014 at 9:18 AM, Warren Young <warren at etr-usa.com> wrote:
> A lot of Dancer is Perl-based DSL.  It "prettier" than this:
>
>      get( '/foo/*', sub { ... } )

Okay, thanks.

> Dancer2 (unlike Dancer1) has a rather convoluted system for exporting
> functions to the right place.

Okay, I think I get it.

I need to use this context "keyword" in my lib/App.pm file to get a 
Dancer2::Core::Context object that I can pass into my other modules, 
since the context keyword only exists in the App.pm module, the 
templates, and other files that Dancer2 has explicit knowledge of. 
Because it isn't really a global function, there's no other way I can 
get this object reference into a module Dancer2 doesn't know about.

>> I care about this because I'm trying to port a fairly complex app from
>> Apache::ASP to Dancer2, and this app is already broken up into many separate
>> modules.
>
> As I've mentioned before on this list, I consider Dancer2 to be alpha
> quality as it is still in active development and is thus not stable
> (though it is getting better).  I would absolutely not port anything
> important or complex to Dancer2.

We've probably got 6-12 months before we'll have to have a shipping 
version of our transplanted app.  Is there any hope that Dancer2 will 
stabilize during that time?

We don't want to go through all this work, then be looking at another 
big rewrite 2-3 years from now because Dancer1 has become a ghost town, 
as Apache::ASP is now.  Apache::ASP served us for 12 years.  We'd like 
to get another 12 out of our next framework.


More information about the dancer-users mailing list