Is there a way to check perl mason syntax on command line? I know that for regular perl modules you can just use perl -c, but this gives rise to errors for mason-specific syntax like docstrings etc ...
For instance:
<%doc>
DOCUMENTATION SHOULD NOT GET PARSED
</%doc>
<%args>
$args
</%args>
<%perl>
my $var = $args->{var};
</%perl>
is a valid perl mason file, but works perl -cagainst it:
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.
source
share