[Dancer-users] Writing tests for Dancer::Plugins

Colin Keith colinmkeith at gmail.com
Wed Aug 3 07:06:07 CEST 2011


Hi,

I'm a newbie to Dancer but so far I like a lot of what I see. I wanted
to try it out by rewriting some of our crusty old CGI apps to Dancer
to give me some experience with it. Needless to say that means the
usual coding horrors of old code, no test suite, so many issues that
Perl::Critic pretty much just goes "blah".

This time around I wanted to keep things modern and include coverage
tests, etc. so I'm looking for advice on the best practices within the
Dancer community.

More specifically I just finished writing a plugin for Dancer but
being a plugin I'm not sure how to write the tests. What is considered
the best way to approach testing them, whip up a quick dancer app in a
test file?

Also, since I'm asking for best practice info;

1. Is it considered better to release to Github and then to CPAN per
Dancer itself?

2. Are there any guidelines on the naming of Dancer plugins

3. Does any one have any good refs for writing unit tests. Most things
I've read so far only say how great their  (yet another) Test::*
module is, cover the basic stuff over and over. I know how to write
the tests, I'm trying to determine what is considered a good level of
writing tests.

My obsession comes from having discovered that you can Hudson for CI with Perl.

Thanks in advance.

Colin.


More information about the Dancer-users mailing list