{"record":{"id":"e34ee688b7c46712","repo":"oraios/serena","slug":"platform-platform-id-is-not-supported-for-perl-a","errorCode":null,"errorMessage":"Platform {platform_id} is not supported for Perl at the moment","messagePattern":"Platform (.+?) is not supported for Perl at the moment","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/perl_language_server.py","lineNumber":97,"sourceCode":"        return super().is_ignored_dirname(dirname) or dirname in [\"blib\", \"local\", \".carton\", \"vendor\", \"_build\", \"cover_db\"]\n\n    @classmethod\n    def _setup_runtime_dependencies(cls) -> str:\n        \"\"\"\n        Check if required Perl runtime dependencies are available.\n        Raises RuntimeError with helpful message if dependencies are missing.\n        \"\"\"\n        platform_id = PlatformUtils.get_platform_id()\n\n        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","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/perl_language_server.py#L79-L115","documentation":"Raised by PerlLanguageServer._setup_runtime_dependencies when the detected platform_id is not in the whitelist of supported platforms (Linux x64/arm64, OSX, OSX_x64, OSX_arm64). The bundled Perl language-server setup only supports those platforms and refuses to run elsewhere.","triggerScenarios":"Instantiating the Perl language server on an unsupported platform_id — e.g. Windows, Linux x86 (32-bit), FreeBSD, or an unusual/unknown platform identifier produced from the host OS/arch.","commonSituations":"Running on Windows; running on a 32-bit Linux; running on Alpine/ARM variants mapping to an unsupported id; container images whose platform detection yields an unexpected id.","solutions":["Run the library on a supported platform (Linux x64/arm64 or macOS x64/arm64).","On Windows, use WSL2 with a supported Linux platform and run the server inside it.","Check how platform_id is derived in your environment (PlatformId helper) and confirm your OS/arch maps to a supported value.","If on a supported platform but still failing, verify the arch detection (e.g. aarch64 vs x86_64 mismatch in the container/emulator, Rosetta misreporting arch)."],"exampleFix":"// before (Windows host)\nserver = PerlLanguageServer(\"C:\\\\repo\")  # unsupported platform\n// after\n# inside WSL2 (Ubuntu x64)\nserver = PerlLanguageServer(\"/mnt/c/repo\")","handlingStrategy":"validation","validationCode":"import platform, sys\ndef supported_platform():\n    if sys.platform.startswith(\"win\"):\n        return False\n    machine = platform.machine().lower()\n    return machine in (\"x86_64\", \"amd64\", \"arm64\", \"aarch64\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the Perl server only on Linux x64/arm64 or macOS x64/arm64","Use WSL2 on Windows","Check container arch (avoid 32-bit images); verify with `uname -m`","Pin base images to known-supported architectures"],"tags":["perl","platform-support","unsupported-platform"],"backgroundTag":"unsupported-platform","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}