Syntax::Check - Wraps 'perl -c' so it works even if modules are unavailable
There is a binary already available upon install of this distribution. Please see syncheck for details.
This module is a wrapper around perl -c for situations where you're trying to do a syntax check on a Perl file, but the libraries that are used by the file are not available to the file.
perl -c
use
use Syntax::Check; my $syn = Syntax::Check->new(%opts, $filename); $syn->check; # or just... Syntax::Check->new(%opts, $filename)->check;
Instantiates and returns a new Syntax::Check object.
Syntax::Check
Parameters:
keep => Bool
Optional, Bool. Delete the temporary library directory structure after the run finishes.
Default: False
verbose => Bool
Optional, Bool: Enable verbose output.
$file
Mandatory, String: The name of the Perl file to operate on.
Performs the introspection of the Perl file we're operating on, hides away the fact that we have library includes that aren't available, and performs a perl -c on the file.
Steve Bertrand, <steveb at cpan.org>
<steveb at cpan.org>
Copyright 2020 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
To install Syntax::Check, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Syntax::Check
CPAN shell
perl -MCPAN -e shell install Syntax::Check
For more information on module installation, please visit the detailed CPAN module installation guide.