in reply to How do you test end-user scripts?
I endorse chromatic's comment. When writing scripts, I typically abstract the work they do into CPAN-like modules and unit test each module using Test::More and the prove command. I strive to keep my script mainlines as short as is practicable. There are many examples of this approach on the CPAN; see, for example, the perltidy command, part of the Perl-Tidy distribution and the perlcritic command, part of the Perl-Critic distribution.
See also: Effective Perl Programming, 2nd edition: Item 91, "Write programs as modulinos for easy testing"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How do you test end-user scripts?
by JavaFan (Canon) on Sep 07, 2010 at 12:08 UTC |
In Section
Seekers of Perl Wisdom