my $lw = length $whole;
my $spare = $sz - $lw - (length $prefix);
return
- $prefix.
($spare > 0 ? (' ' x $spare) : '').
+ $prefix.
substr($whole, ($spare < 0 ? -$spare : 0));
}
foreach my $sz (3..10) {
gentextmodule_demo_start_batch($sz-3);
- gentextmodule_plusq("Small$sz", rjustt($sz, $git_count.$git_dirty))
+ gentextmodule_plusq("Small$sz", rjustt($sz, $git_count, $git_dirty))
if defined $git_count;
gentextmodule_plusq("Git$sz", ljustt($sz, $git_object, $git_dirty))
if (defined $git_count && defined $git_object) {
gentextmodule("Full$sz",
- ljustt($sz, $git_object, ''),
- rjustt($sz, $git_count.$git_dirty));
+ ljustt($sz, $git_object),
+ rjustt($sz, $git_count, $git_dirty));
if (!($sz % 2)) {
my $e = $sz/2;