perrin (email not shown publicly) Perrin is a contributor to various Perl-related projects like mod_perl, Template Toolkit, and Class::DBI. He is a frequent speaker at OSCON, YAPC, and ApacheCon, and a contributor to several perl-related books.
Does anyone have a handy way to run perltidy on code embedded in POD? It feels very backwards to be indenting that by hand when I run perltidy for everything else. Maybe an extension to Pod::Tidy?
This is a bit of a hack, but if you use vim, try this:
vnoremap,pt:!perltidy<cr>
Then, if you enter visual mode (hitting ctrl-v and selecting the lines you want), you can just type,pt and it will reformat the lines you've selected -- event if they're in POD. You'll still need to bump them over a space, but it's better than nothing!
I'm sure emacs has something similar, I just don't know what it is.
If you use vim ... (Score:2)
This is a bit of a hack, but if you use vim, try this:
Then, if you enter visual mode (hitting ctrl-v and selecting the lines you want), you can just type ,pt and it will reformat the lines you've selected -- event if they're in POD. You'll still need to bump them over a space, but it's better than nothing!
I'm sure emacs has something similar, I just don't know what it is.
For Emacs users (Score:1)
shell-command-on-region, which is bound toM-|by default. To tidy the region, typeC-u M-| perltidy RET