Last active
December 21, 2015 16:08
-
-
Save krrrr38/6331133 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun run-perl-region () | |
"指定範囲内のコードをスクリプトとして実行します" | |
(interactive) | |
(if (>= (region-beginning) (region-end)) | |
(message "no selected region") | |
(let ((run-perl-region-file-path "/tmp/run-perl-region")) | |
(write-region (region-beginning) (region-end) run-perl-region-file-path nil) | |
(compile | |
(format | |
"cd %s; perl -M'Project::Libs lib_dirs => [qw(modules/*/lib local/lib/perl5)]' %s" | |
(vc-git-root default-directory) | |
run-perl-region-file-path))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment