The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Syntax::Check - Wraps 'perl -c' so it works even if modules are unavailable

Coverage Status

DESCRIPTION

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.

SYNOPSIS

    use Syntax::Check;

    my $syn = Syntax::Check->new(%opts, $filename);

    $syn->check;

    # or just...

    Syntax::Check->new(%opts, $filename)->check;

METHODS

new(%p, $file)

Instantiates and returns a new Syntax::Check object.

Parameters:

    keep => Bool

Optional, Bool. Delete the temporary library directory structure after the run finishes.

Default: False

    verbose => Bool

Optional, Bool: Enable verbose output.

Default: False

    $file

Mandatory, String: The name of the Perl file to operate on.

check()

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.

AUTHOR

Steve Bertrand, <steveb at cpan.org>

LICENSE AND COPYRIGHT

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