Function: org-babel-perl-evaluate

org-babel-perl-evaluate is a byte-compiled function defined in ob-perl.el.gz.

Signature

(org-babel-perl-evaluate SESSION IBODY &optional RESULT-TYPE RESULT-PARAMS)

Documentation

Pass BODY to the Perl process in SESSION.

If RESULT-TYPE equals output then return a list of the outputs of the statements in BODY, if RESULT-TYPE equals value then return the value of the last statement in BODY, as elisp.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-perl.el.gz
(defun org-babel-perl-evaluate (session ibody &optional result-type result-params)
  "Pass BODY to the Perl process in SESSION.
If RESULT-TYPE equals `output' then return a list of the outputs
of the statements in BODY, if RESULT-TYPE equals `value' then
return the value of the last statement in BODY, as elisp."
  (when session (error "Sessions are not supported for Perl"))
  (let* ((body (concat org-babel-perl-preface ibody))
	 (tmp-file (org-babel-temp-file "perl-"))
	 (tmp-babel-file (org-babel-process-file-name
			  tmp-file 'noquote)))
    (let ((results
           (pcase result-type
             (`output
              (with-temp-file tmp-file
                (insert
                 (org-babel-eval org-babel-perl-command body))
                (buffer-string)))
             (`value
              (org-babel-eval org-babel-perl-command
                              (format org-babel-perl-wrapper-method
                                      body tmp-babel-file))))))
      (when results
        (org-babel-result-cond result-params
	  (org-babel-eval-read-file tmp-file)
          (org-babel-import-elisp-from-file tmp-file '(16)))))))