once.pl
changeset 54 e139241262c3
parent 53 46cb56452832
child 55 1f4bf7fe870e
--- a/once.pl	Sun Dec 20 23:35:02 2015 +0100
+++ b/once.pl	Mon Dec 21 00:39:06 2015 +0100
@@ -41,7 +41,7 @@
 use Cwd qw(getcwd realpath);
 use Digest::MD5 qw(md5_hex);
 
-sub human;        # convert numbers to human readable format
+sub humanize;     # convert numbers to human readable format
 sub deletedir;    # safely delete directories
 sub confirm;      # ask for user confirmation (HTML)
 sub deslash;      # cleanup a path name
@@ -234,7 +234,7 @@
 
             print Tr(
                 td(a { href => "$ENV{PATH_INFO}/$dir$file" }, $file),
-                td({ align => "right" }, human((stat $_)[7])),
+                td({ align => "right" }, humanize((stat $_)[7])),
                 td(scalar localtime +(stat $_)[9]),
                 td($d),
                 td(a({ href => "?delete=$dir" }, 'remove'))
@@ -266,7 +266,7 @@
       grep { /^\Q$ONCE_VAR\E/ } @_;
 }
 
-sub human {
+sub humanize {
     my $_     = shift;
     my @units = qw(B K M G T);
     while (length int > 3 and @units) {