1#!perl 2 3use strict; 4use warnings; 5 6use Test::More; 7 8eval "use Test::TrailingSpace"; 9if ($@) 10{ 11 plan skip_all => "Test::TrailingSpace required for trailing space test."; 12} 13else 14{ 15 plan tests => 1; 16} 17 18# TODO: add .pod, .PL, the README/Changes/TODO/etc. documents and possibly 19# some other stuff. 20my $finder = Test::TrailingSpace->new( 21 { 22 root => '.', 23 filename_regex => qr#(?:\.(?:t|pm|pl|xs|c|h|txt|pod|PL)|README|Changes|TODO|LICENSE)\z#, 24 }, 25); 26 27# TEST 28$finder->no_trailing_space( 29 "No trailing space was found." 30); 31