Skip Menu |

This queue is for tickets about the Text-Format CPAN distribution.

Report information
The Basics
Id: 24262
Status: rejected
Priority: 0/
Queue: Text-Format

People
Owner: Nobody in particular
Requestors: kevinr [...] MIT.EDU
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: A small addition for Text::Format
Date: Sun, 7 Jan 2007 20:56:03 -0500
To: bug-Text-Format [...] rt.cpan.org
From: "Kevin Riggle" <kevinr [...] mit.edu>
Late one night, I found myself desperately in need of a small command-line program to word-wrap simple text files. I have been finding myself in this position with some frequency (though not always late at night), and, discovering that none of the Perl word-wrapping packages provided such a utility, I finally got frustrated enough to write one myself. Text::Format provided the algorithmic heavy lifting I needed -- all I did was encapsulate into a convenient command-line utility, which I've attached, should you desire to include it in the next release. Enjoy! - Kevin -- Kevin Riggle (kevinr@mit.edu)
Download wordwrap
application/octet-stream 1.4k

Message body not shown because it is not plain text.

RT-Send-CC: kevinr [...] mit.edu
Hi Kevin, On Sun Jan 07 20:58:45 2007, kevinr@MIT.EDU wrote: Show quoted text
> Late one night, I found myself desperately in need of a small > command-line program to word-wrap simple text files. I have been > finding myself in this position with some frequency (though not always > late at night), and, discovering that none of the Perl word-wrapping > packages provided such a utility, I finally got frustrated enough to > write one myself. Text::Format provided the algorithmic heavy lifting > I needed -- all I did was encapsulate into a convenient command-line > utility, which I've attached, should you desire to include it in the > next release. > > Enjoy! >
Unfortunately, I cannot really accept this script, as it has too many issues: http://perl-begin.org/tutorials/bad-elements/ 1. No "use strict;" and "use warnings;". 2. Positional @ARGV access. 3. Too many hard-coded settings - many people will need to manually modify it. 4. Glob filehandles. 5. Identically named $in / IN ; OUT / $out . 6. print without { ... } around the filehandle. 7. No use of Getopt::Long. If you're still interested in providing a better program, please submit it here again, and reopen the bug. Regards, -- Shlomi Fish