Is there a way to validate perl mason syntax at the command line? I know for regular perl modules you can just use perl -c
, but that throws errors for mason-specific syntax like docstrings and the like...
For example:
<%doc>
DOCUMENTATION SHOULD NOT GET PARSED
</%doc>
<%args>
$args
</%args>
<%perl>
my $var = $args->{var};
</%perl>
is a valid perl mason file, but running perl -c
against it returns:
Semicolon seems to be missing at path/to/file.mc line 1.
syntax error at path/to/file.mc line 2, near "DOCUMENTATION S"
path/to/file.mc had compilation errors.