Add a new Porting/podtidy to reformat pod using Pod::Tidy
Leon Brocard [Tue, 23 Dec 2008 16:50:43 +0000 (16:50 +0000)]
MANIFEST
Porting/podtidy [new file with mode: 0644]

index 8ad939a..fccb6e0 100644 (file)
--- 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 (file)
index 0000000..a15b378
--- /dev/null
@@ -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,
+);