Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I prevent PerlTidy from aligning my assignments?

Tags:

perl

perl-tidy

By default, PerlTidy will line up assignments in my code. E.g.

PerlTidy changes this...

my $red = 1;
my $green = 2;
my $yellow = 3;
my $cyan = 4;

...into this...

my $red    = 1;
my $green  = 2;
my $yellow = 3;
my $cyan   = 4;

How do I prevent this from happening? I've trawled the manual but I can't find a solution.

Thanks!

like image 254
nick Avatar asked Jun 17 '10 13:06

nick


1 Answers

See the discussion of the -aws option (--add-whitespace). By default -aws is enabled. You can alter this behavior using -naws (deleting whitespace is OK, but don't add) or -fws (don't add or delete whitespace). Details here.

like image 101
FMc Avatar answered Oct 18 '22 00:10

FMc