aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/net/tramp-sh.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index bbc74fcad99..9afa85e8ceb 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -5368,16 +5368,20 @@ Nonexistent directories are removed from spec."
5368 (tramp-message vec 5 "Finding a suitable `perl' command") 5368 (tramp-message vec 5 "Finding a suitable `perl' command")
5369 (let ((result 5369 (let ((result
5370 (or (tramp-find-executable vec "perl5" (tramp-get-remote-path vec)) 5370 (or (tramp-find-executable vec "perl5" (tramp-get-remote-path vec))
5371 (tramp-find-executable 5371 (tramp-find-executable vec "perl" (tramp-get-remote-path vec)))))
5372 vec "perl" (tramp-get-remote-path vec))))) 5372 ;; Perform a basic check.
5373 (and result
5374 (null (tramp-send-command-and-check
5375 vec (format "%s -e 'print \"Hello\n\";'" result)))
5376 (setq result nil))
5373 ;; We must check also for some Perl modules. 5377 ;; We must check also for some Perl modules.
5374 (when result 5378 (when result
5375 (with-tramp-connection-property vec "perl-file-spec" 5379 (with-tramp-connection-property vec "perl-file-spec"
5376 (tramp-send-command-and-check 5380 (tramp-send-command-and-check
5377 vec (format "%s -e 'use File::Spec;'" result))) 5381 vec (format "%s -e 'use File::Spec;'" result)))
5378 (with-tramp-connection-property vec "perl-cwd-realpath" 5382 (with-tramp-connection-property vec "perl-cwd-realpath"
5379 (tramp-send-command-and-check 5383 (tramp-send-command-and-check
5380 vec (format "%s -e 'use Cwd \"realpath\";'" result)))) 5384 vec (format "%s -e 'use Cwd \"realpath\";'" result))))
5381 result))) 5385 result)))
5382 5386
5383(defun tramp-get-remote-stat (vec) 5387(defun tramp-get-remote-stat (vec)