[dancer-users] Namespace for load_app modules
sawyer x
xsawyerx at gmail.com
Sun Dec 8 12:37:25 GMT 2013
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
- it's very generic
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.
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.
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.
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
>>
> _______________________________________________
> 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/20131208/ce9718c5/attachment.html>
More information about the dancer-users
mailing list