[dancer-users] Namespace for load_app modules

Henk van Oers hvo.pm at xs4all.nl
Sun Dec 8 13:15:23 GMT 2013


On Sun, 8 Dec 2013, sawyer x wrote:
> I think that namespace would be a problem for a few reasons:
> - we don't know if we'll end up using it for something

I know you will not if you give Dancer::App::Usergroup to me

> - it's very generic

Yes. Like Dancer::Plugin
And I can make any plugin.

> If someone wants to create the same thing ("hey, I want a mailman in Dancer too"), you basically get a clash. Now you'll have
> Dancer::App::Mailman and Dancer::App::Perlman and Dancer::App::Mailman::Faster, etc.

Yep. Just like in the Plugin namespace.

> The best approach, IMHO, is to give your project a name (like "mailman" is the name) and use that. This is what Starman, Twiggy,
> Dancer, Mojo, etc. do. We all give our projects names and release them under those names.

No we dont.

> Also, another general note: web applications don't really fit the CPAN structure. I think every web framework (including Dancer)
> gets this wrong. Our installation tools are not suited for this type of program. We do our best (sort of) to allow easy
> encapsulation but it's still the wrong approach. I don't think anyone figured it out yet in Perl-land.

I figured it out.

You want me to clame Dancers
and one of these is Dancers::Usergroup


Think again.

--

Henk


> On Sun, Dec 8, 2013 at 12:57 PM, Henk van Oers <henk at signature.nl> wrote:
>
>       On Sun, 8 Dec 2013, sawyer x wrote:
>
>             Can you give an example of one that is useful as a CPAN module?
> 
> 
> Yes, lots.
> How many Dancer::App's can you find that implement:
> - a blog
> - an URL shortener
> - bookmarks
> - pastebins
> - or (from the docs) a forum?
> 
> Some of them need an Auth system
> but we have Dancer-Plugin-Auth-Extensible
> Just configure your Dancer::App in config.yml
> 
> I am working on a "mailman" system.
> Do you want to reinvent a "usergroup"?
> I do. And I want it to look NOT like
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
> 
> So: Dancer::App::Usergroup
> 
> Can I have that namespace?
> 
> --
> Henk
> 
> 
> 
>
>       On Sun, Dec 8, 2013 at 12:27 PM, Henk van Oers <hvo.pm at xs4all.nl> wrote:
>
>             I am a user of https://metacpan.org/pod/Dancer#load_app
>
>             <q>
>             load_app 'Forum', prefix => '/forum', settings => {foo => 'bar'};
>             </q>
>
>             I reuse controler modules in different deployment modules.
>             Some controler modules are useful CPAN modules.
>             They do not extend the DSL, so, are not Dancer::Plugin's.
>
>             Can I use the namespace Dancer::App for those modules?
>
>             --
>             Henk


More information about the dancer-users mailing list