id = "perltidy"
name = "Perltidy"
homepage = "https://perltidy.sourceforge.net/perltidy.html"
description = "a perl script indenter and reformatter"
executables = ["perltidy"]
[dotfiles]
paths = ["~/.perltidyrc", "%USERPROFILE%/perltidy.ini"]
secret = []
side_effect = false
[commands]
format = 1
label = "Tidy Perl code"
description = "Reformat Perl source files. Spacing, tightness and break-control options are left out; use a .perltidyrc for those."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false }
[[commands.source]]
id = "manual"
kind = "manual"
url = "https://manpages.debian.org/unstable/perltidy/perltidy.1.en.html"
revision = "debian unstable"
evidence = """-o=filename,
--outfile=filename
-st,
--standard-output
-b,
--backup-and-modify-in-place
-q, --quiet
-i=n,
--indent-columns=n
-l=n,
--maximum-line-length=n
-t, --tabs
--iterations=n
--noprofile
-pro=filename"""
[[commands.field]]
id = "files"
label = "Perl files"
type = "path"
position = 0
multiple = true
path = { kind = "file", role = "input" }
sources = ["manual"]
[[commands.field]]
id = "in_place"
label = "Modify in place"
description = "Writes the result over each file; the original is kept as .bak."
type = "boolean"
option = ["--backup-and-modify-in-place", "-b"]
effect = "overwrite"
sources = ["manual"]
[[commands.field]]
id = "stdout"
label = "Write to standard output"
type = "boolean"
option = ["--standard-output", "-st"]
sources = ["manual"]
[[commands.field]]
id = "outfile"
label = "Output file"
description = "Only valid with a single input file."
type = "path"
option = ["--outfile"]
path = { kind = "file", role = "output" }
effect = "overwrite"
sources = ["manual"]
[[commands.field]]
id = "indent"
label = "Indent columns"
type = "integer"
option = ["--indent-columns"]
sources = ["manual"]
[[commands.field]]
id = "line_length"
label = "Maximum line length"
type = "integer"
option = ["--maximum-line-length"]
sources = ["manual"]
[[commands.field]]
id = "tabs"
label = "Indent with tabs"
type = "boolean"
option = ["--tabs", "-t"]
sources = ["manual"]
[[commands.field]]
id = "quiet"
label = "Quiet"
type = "boolean"
option = ["--quiet", "-q"]
sources = ["manual"]
[[commands.field]]
id = "noprofile"
label = "Ignore .perltidyrc"
type = "boolean"
option = ["--noprofile"]
sources = ["manual"]
[[commands.task]]
id = "preview"
label = "Preview to standard output"
set = { stdout = [true] }
fields = ["files", "stdout", "indent", "line_length"]
required = ["files"]
[[commands.task]]
id = "in-place"
label = "Tidy in place"
fields = ["files", "in_place", "indent", "line_length"]
required = ["files"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["files", "stdout", "in_place", "outfile"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["indent", "line_length", "tabs", "quiet", "noprofile"]