{
  "id": "perl",
  "name": "Perl",
  "homepage": "https://www.perl.org",
  "description": "Perl is a highly capable, feature-rich programming language with over 38 years of development.",
  "icon": "SimpleIcons:perl",
  "executables": [
    "perl",
    "cpan"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "~/.perldb",
      "~/.cpan/CPAN/MyConfig.pm"
    ],
    "exclude": [
      "~/.cpan/build/",
      "~/.cpan/sources/"
    ],
    "secret": [],
    "machine_lines": [
      {
        "file": "~/.cpan/CPAN/MyConfig.pm",
        "match": {
          "prefix": [
            "'cpan_home'",
            "'build_dir'",
            "'keep_source_where'"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Run Perl",
    "description": "Run a script or a one-liner, or check syntax. Debugger, Unicode (-C) and taint switches are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "revision": "perl -h (local)",
        "evidence": "Usage: perl [switches] [--] [programfile] [arguments]\n  -a                    autosplit mode with -n or -p (splits $_ into @F)\n  -c                    check syntax only (runs BEGIN and CHECK blocks)\n  -e commandline        one line of program (several -e's allowed, omit programfile)\n  -E commandline        like -e, but enables all optional features\n  -F/pattern/           split() pattern for -a switch (//'s are optional)\n  -i[extension]         edit <> files in place (makes backup if extension supplied)\n  -Idirectory           specify @INC/#include directory (several -I's allowed)\n  -l[octnum]            enable line ending processing, specifies line terminator\n  -[mM][-]module        execute \"use/no module...\" before executing program\n  -n                    assume \"while (<>) { ... }\" loop around program\n  -p                    assume loop like -n but print line also, like sed\n  -w                    enable many useful warnings\n  -W                    enable all warnings\n"
      }
    ],
    "field": [
      {
        "id": "one_liner",
        "label": "One-line program (-e)",
        "type": "string",
        "option": [
          "-e"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "one_liner_features",
        "label": "One-line program with all features (-E)",
        "type": "string",
        "option": [
          "-E"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "loop_n",
        "label": "Loop over input lines (-n)",
        "type": "boolean",
        "option": [
          "-n"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "loop_p",
        "label": "Loop and print each line (-p)",
        "type": "boolean",
        "option": [
          "-p"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "autosplit",
        "label": "Autosplit into @F (-a)",
        "type": "boolean",
        "option": [
          "-a"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "line_ending",
        "label": "Line-ending processing (-l)",
        "type": "boolean",
        "option": [
          "-l"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "inplace",
        "label": "Edit files in place (-i)",
        "description": "Without a backup extension; files are overwritten.",
        "type": "boolean",
        "option": [
          "-i"
        ],
        "effect": "overwrite",
        "sources": [
          "help"
        ]
      },
      {
        "id": "syntax_check",
        "label": "Check syntax only",
        "type": "boolean",
        "option": [
          "-c"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "warnings",
        "label": "Enable warnings",
        "type": "boolean",
        "option": [
          "-w"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "include_dir",
        "label": "Extra @INC directory",
        "type": "path",
        "path": {
          "kind": "directory",
          "role": "input"
        },
        "option": [
          "-I"
        ],
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "script",
        "label": "Script file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "position": 0,
        "sources": [
          "help"
        ]
      },
      {
        "id": "args",
        "label": "Arguments or input files",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "position": 1,
        "multiple": true,
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "run_script",
        "label": "Run a script",
        "fields": [
          "script",
          "args",
          "warnings"
        ],
        "required": [
          "script"
        ]
      },
      {
        "id": "filter",
        "label": "Filter lines with a one-liner",
        "fields": [
          "one_liner",
          "loop_p",
          "args"
        ],
        "required": [
          "one_liner",
          "loop_p"
        ],
        "set": {
          "loop_p": [
            true
          ]
        }
      },
      {
        "id": "check",
        "label": "Check script syntax",
        "fields": [
          "script",
          "syntax_check"
        ],
        "required": [
          "script",
          "syntax_check"
        ],
        "set": {
          "syntax_check": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "script",
          "one_liner",
          "args",
          "warnings",
          "syntax_check"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "one_liner_features",
          "loop_n",
          "loop_p",
          "autosplit",
          "line_ending",
          "inplace",
          "include_dir"
        ]
      }
    ]
  }
}
