Skip Menu |

This queue is for tickets about the Smart-Comments CPAN distribution.

Report information
The Basics
Id: 62109
Status: new
Priority: 0/
Queue: Smart-Comments

People
Owner: Nobody in particular
Requestors: zedoriah [...] gmail.com
Cc:
AdminCc:

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



Subject: Literal progress vs Percentage Progress
The progress bars in Smart::Comments give you the progress by percent, sometimes it's preferable to have the actual count instead of (or in addition to) the percent completed. This has been useful in house and I figure someone else probably would want this as well. To this end I've added a one line patch that will convert '@' to be replaced by $at / $max. The code (at roughly line 320) in the current CPAN version simply needs: # Insert the amount done vs the total progress in place of a '@'... s/@/$at \/ $max/g for ( $left, $leader, $right ); Thanks for such a wonderful module. Z
Subject: smart_comments_count.patch
--- Comments.pm.orig 2010-10-13 15:36:56.000000000 -0400 +++ Comments.pm 2010-10-13 15:52:46.000000000 -0400 @@ -321,6 +321,9 @@ sub _for_progress { # Insert the percentage progress in place of a '%'... s/%/int(100*$fraction).'%'/ge for ($left, $leader, $right); + # Insert the amount done vs the total progress in place of a '@'... + s/@/$at \/ $max/g for ( $left, $leader, $right ); + # Work out how much space is available for the bar itself... my $fillwidth = $showwidth - length($left) - length($right);