kiwanami / emacs-edbi

Database Interface for Emacs Lisp
349 stars 34 forks source link

make emacs-edbi aware of local::lib installations of RPC::EPC::Service and DBI modules #46

Open vxe opened 6 years ago

vxe commented 6 years ago

Would prefer to not install system wide, its appears by default edbi:open-db-viewer does't check local::lib installs based on the following error

Connection Error : (error Server may raise an error. Use "M-x epc:pop-to-last-server-process-buffer RET" to see full traceback:
Can't locate RPC/EPC/Service.pm in @INC (you may need to install the RPC::EPC::Service module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Users/vedwin/.emacs.d/elpa/edbi-20160224.1741/edbi-bridge.pl line 4.
BEGIN failed--compilation aborted at /Users/vedwin/.emacs.d/elpa/edbi-20160224.1741/edbi-bridge.pl line 4.

Process epc:server:5 exited abnormally with code 2
)

is there any way we can add this functionality?

ldgonza commented 6 years ago

Does setting an environment variable not work? Did for me. Seems like the right approach.

;; In my .emacs
(setenv "PERL5LIB" (concat "/home/me/perl5/lib/perl5" ":"
               (getenv "PERL5LIB")))
snowman commented 3 years ago
$ perl -V | grep PERL5LIB=
    PERL5LIB="/home/delta/.perl5/lib/perl5"
(setenv "PERL5LIB"
        (concat "/home/delta/.perl5/lib/perl5"
                (when (getenv "PERL5LIB")
                  (concat ":" (getenv "PERL5LIB")))))