ob-perl: implement results interpretation and improve wrapper
commitca125b82b3d8b514aeca9fa305717119836099f0
authorAchim Gratz <Stromeko@Stromeko.DE>
Sun, 24 Feb 2013 22:13:07 +0000 (24 23:13 +0100)
committerAchim Gratz <Stromeko@Stromeko.DE>
Sat, 2 Mar 2013 21:49:46 +0000 (2 22:49 +0100)
tree3363b97fc69a0dacc1150d307edda6b5d57a66ce
parent94934010d7980c0c9c88deef6f165ffca74bc080
ob-perl: implement results interpretation and improve wrapper

* lisp/ob-perl.el (org-babel-execute:perl): Pass `result-params´
  through to `org-babel-perl-evaluate´.
* lisp/ob-perl.el (org-babel-variable-assignments:perl): Add "my" to
  variable declaration so that it becomes compatible with "use
  strict;".
* lisp/ob-perl.el (org-babel-varariable-assignments:perl): Use new
  internal formatting function `org-babel-perl--var-to-perl´.
* lisp/ob-perl.el (org-babel-perl--var-to-perl): New internal function, uses Perl
  non-interpolating quoting on the string that defines the variable to
  suppress spurious interpretation of it as Perl syntax.
* lisp/ob-perl.el (org-babel-perl-wrapper-method): Use a block and
  declare all variables as "my", also use Perl quoting throughout.
  Redirect STDOUT to the temporary file so that simply "print" will
  put the results there.  Check the return value and output in table
  form if it is an ARRAY ref, otherwise print it without a final
  newline.
* lisp/ob-perl.el (org-babel-perl-preface): Content of this variable
  is prepended to body before invocation of perl.
* lisp/ob-perl.el (org-babel-perl-evaluate): Rename input parameter
  body to ibody and let-bind body to concatentation of
  org-babel-perl-preface and ibody.  Implement results interpretation
  so that tables are easier to produce.

Following suggestions by Daniel M. German in
http://thread.gmane.org/gmane.emacs.orgmode/66855.
lisp/ob-perl.el