Test::EOF - Check correct end of files in a project.
Version 0.0801, released 2015-02-05.
use Test::EOF; all_perl_files_ok('lib/Test::EOF', { minimum_newlines => 2 }); done_testing();
This module is used to check the end of files of Perl modules and scripts. It is a way to make sure that files and with (at least) one line break.
It uses \v to look for line breaks. If you want to ensure that only \n are used as line break, use Test::EOL for that first.
\v
\n
There is only one function:
all_perl_files_ok(@directories, { minimum_newlines => 1, maximum_newlines => 2 }); all_perl_files_ok(@directories, { strict => 1 });
Checks all Perl files (basically *.pm and *.pl) in @directories and sub-directories. If @directories is empty the default is the parent of the current directory.
*.pm
*.pl
@directories
minimum_newlines => $minimum
Default: 1
1
Sets the number of consecutive newlines that files checked at least should end with.
maximum_newlines => $maximum
Default: mininum_newlines
mininum_newlines
Sets the number of consecutive newlines that files checked at most should end with.
If maximum_newlines is less than minimum_newlines it gets set to minimum_newlines.
maximum_newlines
minimum_newlines
strict
If strict is given a true value, both minimum_newlines and maximum_newlines will be set to 1. This option has precedence over the other two.
Test::EOL was used as an inspiration.
Dist::Zilla::Plugin::Test::EOF
Test::EOL
Test::NoTabs
Test::More
Erik Carlsson <info@code301.com>
Copyright 2014- Erik Carlsson
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
https://github.com/Csson/p5-test-eof
https://metacpan.org/release/Test-EOF
This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Test::EOF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::EOF
CPAN shell
perl -MCPAN -e shell install Test::EOF
For more information on module installation, please visit the detailed CPAN module installation guide.