Reputation: 457
I want to use the intellij Perl Plugin, but I cannot configure the Perl5 SDK. When I open the .pm
files I get the hint "Perl5 SDK is not configured". I can click on configure and it takes me to preferences -> Languages & Frameworks -> Perl5. Here I get the following:
At Perl5 Interpreter it says Disable Perl5 support. It's the only option in the dropdown. When I click on the gear I can choose "local" and then I can choose between "Add perlbrew Perl", "Add plenv Perl" and "Add system Perl". All options get me to the file system, but no matter which file I'm choosing nothing seems to be correct.
perl -V
gives me the following:
%ENV:
PERL5LIB="/Users/ephan/perl5/lib/perl5"
PERL_LOCAL_LIB_ROOT="/Users/ephan/perl5"
PERL_MB_OPT="--install_base "/Users/ephan/perl5""
PERL_MM_OPT="INSTALL_BASE=/Users/ephan/perl5"
@INC:
/Users/ephan/perl5/lib/perl5/5.30.2/darwin-thread-multi-2level
/Users/ephan/perl5/lib/perl5/5.30.2
/Users/ephan/perl5/lib/perl5/darwin-thread-multi-2level
/Users/ephan/perl5/lib/perl5
/Library/Perl/5.30/darwin-thread-multi-2level
/Library/Perl/5.30
/Network/Library/Perl/5.30/darwin-thread-multi-2level
/Network/Library/Perl/5.30
/Library/Perl/Updates/5.30.2/darwin-thread-multi-2level
/Library/Perl/Updates/5.30.2
/System/Library/Perl/5.30/darwin-thread-multi-2level
/System/Library/Perl/5.30
/System/Library/Perl/Extras/5.30/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.30
which option and which directory can I choose to make it work?
Upvotes: 3
Views: 1855
Reputation: 40748
I tried this now on macOS 11.2.3. First I installed the community edition of IntelliJ IDEA from here.
Then I opened the IDE and installed the perl plugin by choosing Intellij IDEA->Preferences->Plugins
and searching for perl
.
Then, chose File->New->Project..
and then Perl5
from the list:
then clicked the Next
button, and clicked the cog wheel and chose Add system Perl
, then chose the file perl
in directory /usr/bin
:
which gave me this new view
then clicked Next
and chose a name for the new project :
and finally clicked the Finish
button.
Now I added a new perl script to the project by clicking File->New->Perl5 File
and selected the name and type of file from the dialog :
then typed in a simple "Hello world" script in the editor :
Then chose Run->Run..
from the menu :
and selected the test.pl
run configuration from the dialog :
and that's it. It ran the script and gave the following output:
Upvotes: 5