You can use Padre::Plugin::Autoformat under the same terms as Perl itself.