feat(perl): Configure when the module is shown (#2355)

This makes it possible to configure when the perl module is shown
based on the contents of a directory. This should make it possible to
be a lot more granular when configuring the module.
This commit is contained in:
Shu Kutsuzawa
2021-02-22 03:51:36 +09:00
committed by GitHub
parent e73581ddf0
commit 51f752f6b0
3 changed files with 29 additions and 25 deletions
+10 -7
View File
@@ -1966,7 +1966,7 @@ format = "via [🎁 $version](208 bold) "
## Perl
The `perl` module shows the currently installed version of Perl.
The module will be shown if any of the following conditions are met:
By default 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
@@ -1976,12 +1976,15 @@ The module will be shown if any of the following conditions are met:
### Options
| Option | 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. |
| Option | Default | Description |
| -------------------- | ------------------------------------ | ----------------------------------------------------- |
| `format` | `"via [$symbol($version )]($style)"` | The format string for the module. |
| `symbol` | `"🐪 "` | The symbol used before displaying the version of Perl |
| `detect_extensions` | `["pl", "pm", "pod"]` | Which extensions should trigger this moudle. |
| `detect_files` | `["Makefile.PL", "Build.PL", "cpanfile", "cpanfile.snapshot", "META.json", "META.yml", ".perl-version"]` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this module. |
| `style` | `"bold 149"` | The style for the module. |
| `disabled` | `false` | Disables the `perl` module. |
### Variables