Perl

About

Perl is a highly capable, feature-rich programming language with over 30 years of development.

Installation

Change enable from False to True in the perl section (cf module installation).

vscode-anywhere:
    perl:
        enabled: True

You can also take a look at the VSCode-Anywhere perl module configuration.

Requirements

No requirements.

VSCode

VSCode extensions

cfgweb.vscode-perl

This extension aims to bring code intelligence for the Perl language to Visual Studio Code, mainly through the use of Exuberant Ctags.

d9705996.perl-toolbox

This extension provides support for linting and syntax checking for Perl.

mortenhenriksen.perl-debug

This extension provides a debugger for Perl in Visual Studio Code.

VSCode settings

Windows settings

{
    "perl.ctagsPath": "C:\\VSCode-Anywhere\\apps\\scoop\\apps\\ctags\\current\\ctags.exe",
    "perl.perltidy": "C:\\VSCode-Anywhere\\apps\\scoop\\apps\\perl\\current\\perl\\bin\\perltidy.bat",
    "perl-toolbox.syntax.path": "C:\\VSCode-Anywhere\\apps\\scoop\\apps\\perl\\current\\perl\\bin",
    "perl-toolbox.lint.exec": "C:\\VSCode-Anywhere\\apps\\scoop\\apps\\perl\\current\\perl\\site\\bin\\perlcritic.bat"
}

Assuming you have installed in the default directory C:\VSCode-Anywhere.

Linux settings

{
    "perl.ctagsPath": "/home/linuxbrew/.linuxbrew/bin/ctags",
    "perl.perltidy": "/home/linuxbrew/.linuxbrew/bin/perltidy",
    "perl-toolbox.syntax.path": "/home/myuser/VSCode-Anwyhere/apps/vscode-anywhere/home/.nix-profile/bin",
    "perl-toolbox.lint.exec": "/home/myuser/VSCode-Anwyhere/apps/vscode-anywhere/home/.nix-profile/bin/perlcritic"    
}

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

MacOS settings

{
    "perl.ctagsPath": "/home/linuxbrew/.linuxbrew/bin/ctags",
    "perl.perltidy": "/home/linuxbrew/.linuxbrew/bin/perltidy",
    "perl-toolbox.syntax.path": "/home/myuser/VSCode-Anwyhere/apps/vscode-anywhere/home/.nix-profile/bin",
    "perl-toolbox.lint.exec": "/home/myuser/VSCode-Anwyhere/apps/vscode-anywhere/home/.nix-profile/bin/perlcritic"    
}

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

VSCode keybindings

No keybindings.

Software

Windows software

scoop

Linux software

brew

nix

MacOS software

brew

nix

Documentation

VSCode-Anywhere

Environment

Windows environment

PATH: C:\VSCode-Anywhere\apps\scoop\apps\perl\current\c\bin;C:\VSCode-Anywhere\apps\scoop\apps\perl\current\perl\bin;C:\VSCode-Anywhere\apps\scoop\apps\perl\current\perl\site\bin

Linux environment

No environment.

MacOS environment

No environment.

Specific settings

cpan

Allow to manage cpan packages.

  • pkgs: name of the packages to install

    • enabled: True to enable, False to skip (default to False)

    • version: the version of the cpan package

  • opts

opts is not mandatory but allows to pass additional arguments.

Extra args can be arguments described in the Saltstack cpan states or can be global Saltstack arguments.

Global opts packages settings:

  • cpan:pkgs:opts:global: allow passing arguments to all cpan packages when installing, updating, or uninstalling a package

  • pm:pkgs:opts:install: allow passing arguments to all cpan packages when installing a package (cf states.cpan.installed)

  • cpan:pkgs:opts:update: allow passing arguments to all cpan packages when updating a package (cf states.cpan.uptodate)

  • cpan:pkgs:opts:uninstall: allow passing arguments to all cpan packages when uninstalling a package (cf states.cpan.removed)

Specific opts packages settings:

  • cpan:pkgs:<mypkg>:opts:global: allow passing arguments to <mypkg> cpan package when installing, updating, or uninstalling the package

  • cpan:pkgs:<mypkg>:opts:install: allow to pass arguments to <mypkg> cpan packages when installing the package (cf states.cpan.installed)

  • cpan:pkgs:<mypkg>:opts:update: allow to pass arguments to <mypkg> cpan packages when updating the package (cf states.cpan.uptodate)

  • cpan:pkgs:<mypkg>:opts:uninstall: allow to pass arguments to <mypkg> cpan packages when uninstalling the package (cf states.cpan.removed)

  • Windows:

vscode-anywhere:
  perl:
    cpan:
      opts:
        global:
          bin_env: C:\VSCode-Anywhere\apps\scoop\apps\perl\current\perl\bin\cpan.bat
        install: {}
        update: {}
        uninstall: {}
      pkgs:
        Perl::Tidy:
          enabled: True
          version: null
          opts:
            install: {}
            update: {}
            uninstall: {}
        Perl::Critic:
          enabled: True
          version: null
          opts:
            install: {}
            update: {}
            # uninstall: {}

Assuming you have installed in the default directory C:\VSCode-Anywhere.

  • Linux

vscode-anywhere:
  perl:
    cpan:
      opts:
        global:
          bin_env: /home/linuxbrew/.linuxbrew/bin/cpan
        install: {}
        update: {}
        uninstall: {}
  • MacOS

vscode-anywhere:
  perl:
    cpan:
      opts:
        global:
          bin_env: /home/linuxbrew/.linuxbrew/bin/cpan
        install: {}
        update: {}
        uninstall: {}

Last updated