http://www.perlmonks.org?node_id=711910


in reply to Testing Perl files rather than modules

Perl doesn't have "include", but it has "use" and "require"

#!/usr/bin/perl #script.pl use strict; use warnings; sub hello { return "Hello, World!\n" } 1; #!/usr/bin/perl #test.t use strict; use warnings; use Test::More tests => 2; require_ok("script.pl"); #tests 'require "script.pl" is(hello(), "Hello, World!\n", 'hello() should return "Hello, World!"'

Stop saying 'script'. Stop saying 'line-noise'.
We have nothing to lose but our metaphors.