Loading ...
Sorry, an error occurred while loading the content.

17010Re: checking Perl syntax

Expand Messages
  • Sheri
    Oct 1, 2007
    • 0 Attachment
      I don't have and have never seen Wayne's script but you can get some
      syntax checking on a Perl script if it includes:

      use warnings;

      If you have that, maybe this does what you want? Note that perl must
      be on your path. Using a variable based on ^$GetShort(^$GetPerlExe$)$
      instead doesn't seem to work. Neither do various command lines based
      on ^!RunScript, ^!RunPerl or ^$GetInputOutput$. You need to be able to
      have the -c recognized as a parameter. A small irritation with the
      ^$GetDosOutput$ is that there won't be any output, and you can't
      suppress the error dialog stating that fact.

      ;long line
      ^!Continue Before continuing please make sure the current document is
      the perl script to be syntax checked. The script should be in its own
      .pl file (not in a clip library).
      ;end long line
      ^!DeleteFile "^$GetDataPath$StdError.err"
      ^!Set %mytmp%="^$GetShort(^**)$"
      ^$GetDOSOutput(perl -c ^%mytmp%)$
      :Serr
      ^!IfFileExist "^$GetDataPath$StdError.err" Next ELSE Serr
      ;long line
      ^!Info Script Errors and
      Warnings^%NL%^$GetFileText("^$GetDataPath$StdError.err")$
      ;end long line
    • Show all 2 messages in this topic