feat(perl): Added perl version module (#1382)

Adds a module for perl support.
This commit is contained in:
Stéphane Benoit
2020-08-04 18:22:44 +02:00
committed by GitHub
parent c5f2eedf07
commit ef55042f2e
8 changed files with 304 additions and 0 deletions
+40
View File
@@ -200,6 +200,7 @@ $julia\
$nim\
$nodejs\
$ocaml\
$perl\
$php\
$purescript\
$python\
@@ -1765,6 +1766,45 @@ The module will be shown if any of the following conditions are met:
format = "via [🐪 $version]($style) "
```
## Perl
The `perl` module shows the currently installed version of Perl.
The module will be shown if any of the following conditions are met:
- The current directory contains a `Makefile.PL` or `Build.PL` file
- The current directory contains a `cpanfile` or `cpanfile.snapshot` file
- The current directory contains a `META.json` file or `META.yml` file
- The current directory contains a `.perl-version` file
- The current directory contains a `.pl`, `.pm` or `.pod`
### Options
| Variable | Default | Description |
| ---------- |----------------------------------- | ----------------------------------------------------- |
| `format` | `"via [$symbol$version]($style) "` | The format string for the module.|
| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl |
| `style` | `"bold 149"` | The style for the module. |
| `disabled` | `false` | Disables the `perl` module. |
### Variables
| Variable | Example | Description |
| -------- | --------- | ------------------------------------ |
| version | `v5.26.1` | The version of `perl` |
| symbol | | Mirrors the value of option `symbol` |
| style\* | | Mirrors the value of option `style` |
### Example
```toml
# ~/.config/starship.toml
[perl]
format = "via [🦪 $version]($style) "
```
## PHP
The `php` module shows the currently installed version of PHP.