- SEE ALSO
- LICENSE AND COPYRIGHT
Test::Syntax::Aggregate - Check syntax of multiple scripts
This module allows you to check syntax of multiple scripts using the same common module.
use Test::Syntax::Aggregate; check_scripts_syntax( preload => [ @modules ], scripts => [ @scripts ], );
Suppose you have a lot of cgi scripts that use the same set of preloaded modules. If you running syntax check on these scripts it may take a lot of time mostly because of loading perl and common modules for every single script. This module borrows idea and some code from Test::Aggregate and ModPerl::Registry. It preloads specified modules first, and when compiles scripts wrapping them into functions.
Runs syntax checks for all specified files. Accepts following parameters:
Reference to array with list of modules that must be preloaded before testing. Preloading modules allows you significantly speedup testing.
Reference to array containing list of scripts to check syntax.
List of directories to look for modules files. Defaults to @INC.
Hide any warnings produced by scripts during checks unless check failed.
It exports check_scripts_syntax function.
<zwon at cpan.org>
It modifies scripts, so it is possible that it will introduce syntax errors to some of them or fix and miss existing errors in other cases.
Copyright 2011 Pavel Shaydo.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.