{
    "version": "5.42.2.1",
    "description": "A programming language suitable for writing simple scripts as well as complex applications.",
    "homepage": "https://strawberryperl.com",
    "license": "GPL-1.0-or-later|Artistic-1.0-Perl",
    "notes": [
        "To avoid conflicts with other C/C++ compilers, '$dir\\c\\bin' will not be added to the PATH.",
        "For more information, see: https://github.com/ScoopInstaller/Main/pull/2832",
        "",
        "This may cause some preinstalled Perl modules to fail.",
        "If you encounter this issue, please run the following command to manually add it to the PATH:",
        "",
        "# To add to the user PATH, run PowerShell and execute:",
        "[Environment]::SetEnvironmentVariable(\"Path\", $env:Path + \";$dir\\c\\bin\", 'User')",
        "",
        "# To add to the system PATH instead, run PowerShell as administrator and execute:",
        "[Environment]::SetEnvironmentVariable(\"Path\", $env:Path + \";$dir\\c\\bin\", 'Machine')"
    ],
    "architecture": {
        "64bit": {
            "url": "https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54221_64bit/strawberry-perl-5.42.2.1-64bit-portable.zip",
            "hash": "32d83be90cf04b807cfb9477482bc36302cdee6f5b04cf57e81adecbd8f07898"
        }
    },
    "post_install": [
        "# enable standard idiomatic access to user's home directory",
        "## remove HomeDir section from portable.perl (disables Portable.pm override of File::HomeDir)",
        "## NOTE: conversion to byte[] avoids adding an extra trailing newline to the output file",
        "[System.IO.File]::WriteAllBytes(\"$dir\\portable.perl\", ([byte[]][char[]]((Get-Content -Raw \"$dir\\portable.perl\") -replace \"(?ms)^HomeDir:.*?^(?=\\S)\",\"\")))"
    ],
    "env_add_path": [
        "perl\\site\\bin",
        "perl\\bin"
    ],
    "checkver": {
        "github": "https://api.github.com/repos/StrawberryPerl/Perl-Dist-Strawberry/releases/latest",
        "regex": "releases/download/(?<tag>\\w+)/strawberry-perl-([\\d.]+)-64bit-portable\\.zip\""
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/$matchTag/strawberry-perl-$version-64bit-portable.zip",
                "hash": {
                    "url": "https://strawberryperl.com/releases.json",
                    "jsonpath": "$[?(@.version == '$version')].edition.portable.sha256"
                }
            }
        }
    }
}
