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

DESCRIPTION

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

Binary:

    ./syncheck [--verbose] [--keep] perl_filename.ext

Library:

    use Syntax::Check;

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

BINARY PROGRAM syncheck

Installed with this library is a binary application that uses the library.

Usage:

    ./syncheck [-k] [-v] perl_file_name.ext

--keep|-k

If supplied, we will keep the temporary library directory structure in your temp dir. By default we delete this directory upon program completion.

--verbose|-v

Supply this argument to get verbose output.

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