{"record":{"id":"d90721808c439501","repo":"oraios/serena","slug":"found-a-perl-version-but-perl-languageserver-is-n","errorCode":null,"errorMessage":"Found a Perl version but Perl::LanguageServer is not installed.\nPlease install Perl::LanguageServer: cpanm Perl::LanguageServer\nSee: https://metacpan.org/pod/Perl::LanguageServer","messagePattern":"Found a Perl version but Perl::LanguageServer is not installed\\.\nPlease install Perl::LanguageServer: cpanm Perl::LanguageServer\nSee: https://metacpan\\.org/pod/Perl::LanguageServer","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/perl_language_server.py","lineNumber":107,"sourceCode":"        valid_platforms = [\n            PlatformId.LINUX_x64,\n            PlatformId.LINUX_arm64,\n            PlatformId.OSX,\n            PlatformId.OSX_x64,\n            PlatformId.OSX_arm64,\n        ]\n        if platform_id not in valid_platforms:\n            raise RuntimeError(f\"Platform {platform_id} is not supported for Perl at the moment\")\n\n        perl_version = cls._get_perl_version()\n        if not perl_version:\n            raise RuntimeError(\n                \"Perl is not installed. Please install Perl from https://www.perl.org/get.html and make sure it is added to your PATH.\"\n            )\n\n        perl_ls_version = cls._get_perl_language_server_version()\n        if not perl_ls_version:\n            raise RuntimeError(\n                \"Found a Perl version but Perl::LanguageServer is not installed.\\n\"\n                \"Please install Perl::LanguageServer: cpanm Perl::LanguageServer\\n\"\n                \"See: https://metacpan.org/pod/Perl::LanguageServer\"\n            )\n\n        return \"perl -MPerl::LanguageServer -e 'Perl::LanguageServer::run'\"\n\n    @staticmethod\n    def _resolve_filter_settings(solidlsp_settings: SolidLSPSettings) -> tuple[list[str], list[str]]:\n        \"\"\"Resolve the ``fileFilter`` / ``ignoreDirs`` to hand to Perl::LanguageServer.\n\n        Reads optional overrides from ``ls_specific_settings[\"perl\"]`` (keys ``file_filter`` and\n        ``ignore_dirs``); falls back to the defaults otherwise. Extracted as a pure function so the\n        configuration plumbing can be unit-tested without starting the language server.\n        \"\"\"\n        perl_settings = solidlsp_settings.get_ls_specific_settings(LanguageServerId.PERL)\n        file_filter = perl_settings.get(\"file_filter\", list(_DEFAULT_FILE_FILTER))\n        ignore_dirs = perl_settings.get(\"ignore_dirs\", list(_DEFAULT_IGNORE_DIRS))","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/perl_language_server.py#L89-L125","documentation":"Raised when a Perl interpreter is found but the Perl::LanguageServer CPAN module is not installed (_get_perl_language_server_version() returns falsy). Perl itself is present; only the language-server module is missing, so the library tells you to install it via cpanm.","triggerScenarios":"Instantiating the Perl language server where `perl -MPerl::LanguageServer -e ...` fails (module not in @INC) — e.g. system perl without the module, or a perlbrew switch lacking it.","commonSituations":"Fresh perl install without the module; using a different perl (perlbrew/plenv/system) than the one where the module was installed; module installed under a lib path not in @INC; minimal image where cpanm was never run.","solutions":["Install the module: `cpanm Perl::LanguageServer` (install cpanm first via `curl -L https://cpanmin.us | perl - -- App::cpanminus` if needed).","Verify with `perl -MPerl::LanguageServer -e 'print $Perl::LanguageServer::VERSION'` that the module loads in the same perl that launches the server.","If using perlbrew/plenv, run cpanm under the SAME perl that will be used at runtime (`perlbrew use <ver> && cpanm Perl::LanguageServer`).","On distros with packages, `apt install libperl-language-server-perl` may work instead of cpanm."],"exampleFix":"// before (shell)\nperl -v  # ok\npython -m app  # Perl::LanguageServer missing\n// after\ncpanm Perl::LanguageServer\nperl -MPerl::LanguageServer -e '1' && python -m app","handlingStrategy":"validation","validationCode":"import subprocess\ndef perl_ls_installed():\n    return subprocess.run(\n        [\"perl\", \"-MPerl::LanguageServer\", \"-e\", \"1\"], capture_output=True\n    ).returncode == 0","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `cpanm Perl::LanguageServer` with the same perl used at runtime","Verify with `perl -MPerl::LanguageServer -e 1` in a preflight","Bake the cpanm install into Dockerfiles/CI setup","Ensure the module's install path is in @INC (don't mix system/perlbrew lib paths)"],"tags":["perl","cpan","missing-dependency","language-server"],"backgroundTag":"dependency-not-installed","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}