morgon has asked for the wisdom of the Perl Monks concerning the following question:
I want to transform a hash definition like this:
to something like this:%some_hash = ( key => "value1", larger_key => "value2", even_larger_key => "value3", );
i.e. make the fat commas line up in perl source code.%some_hash = ( key => "value1", larger_key => "value2", even_larger_key => "value3", );
By "transform" I mean a perl-script that takes the key-value lines from stdin and prints the prettyfied versions to stdout so I can call it from vim.
As this seems to be a quite natural requirement I assume some module does things like that already (lazyness is a virtue right).
So could someone please point me to such a modules (I am NOT looking for someone to code this for me).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: prettyfy hashes
by james28909 (Deacon) on Apr 03, 2016 at 01:49 UTC | |
|
Re: prettyfy hashes
by BrowserUk (Patriarch) on Apr 03, 2016 at 02:13 UTC | |
|
Re: prettyfy hashes
by choroba (Cardinal) on Apr 03, 2016 at 02:07 UTC | |
by LanX (Saint) on Apr 03, 2016 at 03:39 UTC | |
by choroba (Cardinal) on Apr 03, 2016 at 13:10 UTC | |
by LanX (Saint) on Apr 03, 2016 at 14:02 UTC | |
by choroba (Cardinal) on Apr 03, 2016 at 14:08 UTC | |
by LanX (Saint) on Mar 23, 2019 at 14:05 UTC | |
by LanX (Saint) on Mar 25, 2019 at 00:08 UTC | |
by LanX (Saint) on Apr 03, 2016 at 14:35 UTC | |
by LanX (Saint) on Apr 03, 2016 at 15:26 UTC | |
|
Re: prettyfy hashes
by 1nickt (Canon) on Apr 03, 2016 at 18:18 UTC |