Hi, I have a couple of issues, before opening tickets let me ask them. IMHO it would be better to create a CPAN like distribution instead of what dancer creates now so I wonder if it would be better to dancer -a rock - create Makefile.PL - put module in lib and call it Rock.pm - in order to find the module the rock.pl should contain something like this: use Cwd (); use lib path(dirname(Cwd::abs_path $0), 'lib'); Making sure the module can be loaded even if the script is executed while the current directory is in another place. Add this before the "use Application;" line or add a function to Dancer setup_relative_dir() and insert that in the script or make this part of Dancer.pm. - creat t/ directory and a simple test that can launch the application and test it - Add default pod in the module: =head1 NAME Module - A Dance based web application =head COPYRIGHT =head1 LICENSE =cut regards Gabor
Le mercredi 07 avril 2010 à 09:00 +0300, Gabor Szabo a écrit :
IMHO it would be better to create a CPAN like distribution instead of what dancer creates now so I wonder if it would be better to
dancer -a rock
- create Makefile.PL - put module in lib and call it Rock.pm
Sounds good, this is perlish and would allow the end-user to describe some meta information for their app like extenral dependencies and provide testing facilities. I like that idea.
- in order to find the module the rock.pl should contain something like this:
use Cwd (); use lib path(dirname(Cwd::abs_path $0), 'lib');
Hmm, I'm just afraid that will make the end-user application code a bit obfuscated. One of Dancer's key target is to provide a clean, easily understandable syntax. This Perl magick is a bit tricky for new comers. Maybe this could be hidden by a Dancer helper, like 'load_application('Rock')'.
- creat t/ directory and a simple test that can launch the application and test it - Add default pod in the module:
Sounds good as well. Regards, -- Alexis Sukrieh
Le mercredi 07 avril 2010 à 09:00 +0300, Gabor Szabo a écrit :
IMHO it would be better to create a CPAN like distribution instead of what dancer creates now so I wonder if it would be better to
Hi, For the record, I've done that, and forwarded that request in our issue tracker: http://github.com/sukria/Dancer/issues/closed#issue/61 It's done in the devel branch, feel free to give it a try: $ git pull git://github.com/sukria/Dancer.git devel Note that I've also added Dancer::Test in order to let the end-user test their app without the need of knowing Dancer internals. I you have more ideas regarding this issue, feel free to re-open it. -- Alexis Sukrieh
El vie, 09-04-2010 a las 15:04 +0200, Alexis Sukrieh escribió:
[...]
Note that I've also added Dancer::Test in order to let the end-user test their app without the need of knowing Dancer internals.
Damn, *after* I've coded my own stuff to make my tests :P Great work, thank you! Cheers, Juanjo -- jjm's home: http://www.usebox.net/jjm/ blackshell: http://blackshell.usebox.net/ ramble on: http://rambleon.usebox.net/
participants (3)
-
Alexis Sukrieh -
Gabor Szabo -
Juan J. Martínez