/**
  * Parse file
  * @param string $Filename relative path (from FRONTEND_PATH) to file
  */
 public function parseFile($Filename)
 {
     $File = FRONTEND_PATH . $Filename;
     $this->Filename = FRONTEND_PATH . $Filename . '.temp';
     $Command = new PerlCommand();
     $Command->setScript('fittorunalyze.pl', '"' . $File . '" 1>"' . $this->Filename . '"');
     $Shell = new Shell();
     $Shell->runCommand($Command);
     $this->readFile();
 }
示例#2
0
 /**
  * Is Perl available?
  * 
  * Tries to run a testscript and returns true if succeeded.
  * @return boolean
  */
 public static function isPerlAvailable()
 {
     try {
         $Command = new PerlCommand();
         $Command->setScript('test.pl', '');
         $Shell = new Shell();
         $Shell->runCommand($Command);
         return $Shell->getOutput() == 'success';
     } catch (Exception $Exception) {
         return false;
     }
 }