* lisp/net/tramp-sh.el (tramp-get-remote-perl): Perform a basic check.

(Bug#22478)
This commit is contained in:
Michael Albinus 2016-08-26 15:12:42 +02:00
parent b39c0b31f0
commit 4a46232d92

View file

@ -5368,8 +5368,12 @@ Nonexistent directories are removed from spec."
(tramp-message vec 5 "Finding a suitable `perl' command")
(let ((result
(or (tramp-find-executable vec "perl5" (tramp-get-remote-path vec))
(tramp-find-executable
vec "perl" (tramp-get-remote-path vec)))))
(tramp-find-executable vec "perl" (tramp-get-remote-path vec)))))
;; Perform a basic check.
(and result
(null (tramp-send-command-and-check
vec (format "%s -e 'print \"Hello\n\";'" result)))
(setq result nil))
;; We must check also for some Perl modules.
(when result
(with-tramp-connection-property vec "perl-file-spec"