summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Brocard <acme@astray.com>2008-12-23 16:50:43 +0000
committerLeon Brocard <acme@astray.com>2008-12-23 16:50:43 +0000
commit80029904763df471b761bf9ea848da86d4196c18 (patch)
tree5ecd0588bd82819e35b8e71b558c18d137318a93
parent9d68b7edc4b584a60244a8795c68b70f38b7c07d (diff)
downloadperl-80029904763df471b761bf9ea848da86d4196c18.tar.gz
Add a new Porting/podtidy to reformat pod using Pod::Tidy
-rw-r--r--MANIFEST1
-rw-r--r--Porting/podtidy18
2 files changed, 19 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index 8ad939a510..fccb6e0236 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3525,6 +3525,7 @@ Porting/p4d2p Generate patch from p4 diff
Porting/p4genpatch Generate patch from p4 change in repository (obsoletes p4desc)
Porting/patching.pod How to report changes made to Perl
Porting/patchls Flexible patch file listing utility
+Porting/podtidy Reformat pod using Pod::Tidy
Porting/pumpkin.pod Guidelines and hints for Perl maintainers
Porting/README.y2038 Perl notes for the 2038 fix
Porting/regcharclass.pl Generate regcharclass.h from inline data
diff --git a/Porting/podtidy b/Porting/podtidy
new file mode 100644
index 0000000000..a15b3786cf
--- /dev/null
+++ b/Porting/podtidy
@@ -0,0 +1,18 @@
+#!perl
+use strict;
+use warnings;
+use Pod::Tidy;
+
+# Reformat pod using Pod::Tidy
+
+# 72 is what fmt defaults to
+$Text::Wrap::columns = 72;
+
+my $filename = shift || die "Usage podtidy [filename]";
+
+Pod::Tidy::tidy_files(
+ files => [$filename],
+ verbose => 1,
+ inplace => 1,
+ nobackup => 1,
+);