[Dancer-users] Create standard CPAN module structure
Alexis Sukrieh
sukria at sukria.net
Wed Apr 7 09:14:08 UTC 2010
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
More information about the Dancer-users
mailing list