The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
META.yml 32
Makefile.PL 11
README 12
TabularDisplay.pm 511
examples/dump-passwd.pl 24
5 files changed (This is a version diff) 1220
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Text-TabularDisplay
-version:            1.35
+version:            1.38
 abstract:           Display text in formatted table output
 author:
     - darren chamberlain <darren@cpan.org>
@@ -10,8 +10,7 @@ configure_requires:
     ExtUtils::MakeMaker:  0
 build_requires:
     ExtUtils::MakeMaker:  0
-requires:
-    IO::File:  ~
+requires:  {}
 no_index:
     directory:
         - t
@@ -5,7 +5,7 @@ use vars qw(%PREREQ_PM @EXE_FILES %clean);
 
 use ExtUtils::MakeMaker;
 
-%PREREQ_PM = ('IO::File');
+%PREREQ_PM = ();
 %clean     = ('FILES' => '$(DISTVNAME).tar$(SUFFIX)');
 
 WriteMakefile(
@@ -233,7 +233,8 @@ CREDITS
         Slaven Rezic
         Harlan Lieberman-Berg
         Patrick Kuijvenhoven
+        Miko O'Sullivan
 
 VERSION
-    This documentation describes "Text::TabularDisplay" version 1.35.
+    This documentation describes "Text::TabularDisplay" version 1.37.
 
@@ -2,7 +2,7 @@ package Text::TabularDisplay;
 
 # -------------------------------------------------------------------
 # Text::TabularDisplay - Display text in formatted table output
-# Copyright (C) 2004-2012 darren chamberlain <darren@cpan.org>
+# Copyright (C) 2004-2014 darren chamberlain <darren@cpan.org>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
@@ -15,15 +15,15 @@ package Text::TabularDisplay;
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307  USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
 # -------------------------------------------------------------------
 
 use strict;
 use integer;
 use vars qw($VERSION);
 
-$VERSION = "1.35";
+$VERSION = "1.38";
 
 # ---======================= Public Methods ======================---
 
@@ -284,6 +284,11 @@ sub _column_length
             if $len < length;
     }
 
+    # untaint $len
+    unless ($len =~ m|^(\d+)$|s)
+        { die 'invalid length: ' . $len }
+    $len = $1;
+
     return $len;
 }
 
@@ -553,8 +558,9 @@ feedback, or good karma:
     Slaven Rezic
     Harlan Lieberman-Berg
     Patrick Kuijvenhoven
+    Miko O'Sullivan
 
 =head1 VERSION
 
-This documentation describes C<Text::TabularDisplay> version 1.35.
+This documentation describes C<Text::TabularDisplay> version 1.38.
 
@@ -9,8 +9,10 @@ local *PASSWD;
 open PASSWD, "/etc/passwd"
     or die "Can't open /etc/passwd: $!";
 
-$t->add((split /:/, $_)[2, 0, 4])
-    for <PASSWD>;
+for (<PASSWD>) {
+    $t->add((split /:/, $_)[2, 0, 4])
+        unless /^#/;
+}
 
 close PASSWD
     or die "Can't close /etc/passwd: $!";