Questions tagged [perl-tidy]

Perl::Tidy parses and beautifies Perl source code.

perltidy : a perl script indenter and reformatter

Wikipedia

42 questions
1
vote
1 answer

PPI - prune PPI::Token::Whitespace - question

When I use "$module->prune( 'PPI::Token::Whitespace' );" and save the results in $file is there an ease way back to working code for the saved code? I tried "Perl::Tidy" and it looks much better after this but id does not fix all. #!/usr/bin/env…
sid_com
  • 24,137
  • 26
  • 96
  • 187
1
vote
2 answers

How to configure Perl Tidy not wrap the lines?

I am using Per Tidy plugin in Padre IDE. By default, Tidy wrap my long lines into multiple lines which I don't like. How can I tell Tidy never wrap my lines?
Jirong Hu
  • 2,315
  • 8
  • 40
  • 63
1
vote
1 answer

Perl::Tidy to minify Perl code

I am trying to use Perl::Tidy module to minify Perl code as much as possible. I do not care about formatting of course, so I am setting the argv manually for the module. One issue that I am unable to figure out is the space on the sides of the "="…
daliaessam
  • 1,636
  • 2
  • 21
  • 43
1
vote
1 answer

any option to control perltidy to break before the bracket in array define?

I have a code snippet like: my $a_box = [ [$a11, $a12, $a13, $a14, $a15, $a16], [$a21, $a22, $a23, $a24, $a25, $a26], [$a31, $a32, $a33, $a34, $a35, $a36], [$a41, $a42, $a43, $a44, $a45, $a46], [$a51, $a52, $a53, $a54, $a55,…
chun
  • 13
  • 3
1
vote
1 answer

perltidy-mode autorun in Emacs

I have a perltidy-mode.el lisp file, which is being loaded - I can call it manually by M-x perltidy-mode. What would be the proper way to run it automatically after a file is opened (or emacs is loaded)? (defalias 'perl-mode 'cperl-mode) (defalias…
vol7ron
  • 40,809
  • 21
  • 119
  • 172
0
votes
0 answers

Is it possible to make perltidy plugin?

Referring to my previous question: How can I format boolean operators with perltidy? wondering if it's possible to make a perltidy plugin with my own finer formatting rules? Does perltidy allow this?
0
votes
0 answers

How to apply something like --space-prototype-paren=0 but for signatures with perltidy

We have the following code: sub some_method($self, %args) { #code here } When I run it trough perltidy it gets formatted like this: sub some_method ($self, %args) { #code here } How to make perltidy to not add the space between the…
Беров
  • 1,383
  • 10
  • 22
0
votes
2 answers

Why does my perl script behave differently if I run it from the icon vs running it from the command line?

This is only the second perl script I have written, so any constructive help/advice would be greatly appreciated. Also, note that I am working on a Windows machine, using Strawberry Perl. I am aware that a Tidy module exists for Perl, but (for…
1723842
  • 71
  • 1
  • 9
0
votes
2 answers

How can perltidy align the opening parenthesis for method arguments?

is there a possibility to make perltidy vertically align brackets like this: $foo->bar (1); $foo->bat (2); $foo->bac (3); $foo->bad …
Robert
  • 4,324
  • 2
  • 18
  • 22
0
votes
1 answer

perltidy formatting multilines

I'm trying to get perltidy to format an if statement like this: if ($self->image eq $_->[1] and $self->extension eq $_->[2] and $self->location eq $_->[3] and $self->modified eq $_->[4] and $self->accessed eq…
0
votes
1 answer

svn diff through perltidy

I want to run perltidy before i look for diff in my subversion working copy. in svn config i wrote: diff-cmd = /usr/bin/d.sh As David W said in this answer https://stackoverflow.com/a/5834900/1927848 i make a script…
Suic
  • 2,441
  • 1
  • 17
  • 30
0
votes
3 answers

How to enable map command in vim?

How to enable map command only when filetype is 'perl'? something like: if(&ft=='perl') map ,pt :%! perltidy endif but it doesn't work.
abra
  • 585
  • 1
  • 5
  • 12
1 2
3