May 2011 Archives

The First Test I Always Write

Nothing fancy, I just find myself copying this test into t/ directory of every new project so I thought others might find it useful, too.

Basically, it just runs Test::More's use_ok() on every file in the package's blib/lib directory to ensure that everything is building okay.

file: 000use.t

use Test::More;
use File::Find;

my @classes = ();

my $root = 'blib/lib';

File::Find::find(
sub …

About ubu

user-pic Senior Architect, Tamarou.