It is a subjective decision, but I agree with you that converting data values which are stored as kilobytes into a different human-readable format is something that should be in the view. In particular, you might decide to give users the option as to how they want that number displayed (straight kilobytes or human-readable), in which case it's definitely a view concern.
As to how to go about that, I would go with a template filter. You'd set up a function which accepts the number as input and returns the "pretty" formatted string. Then you set the option in your template configuration to call that function as a filter. Say you named your function
pretty_size, then you'd do something like this:
$template = Template->new({
FILTERS => {
'pretty_size' => \&pretty_size,
},
});
Update: Under Catalyst, that'd probably be somewhere in your view module, for example in
TT.pm, e.g.:
__PACKAGE__->config({
#...existing config...
FILTERS => {
'pretty_size' => \&pretty_size,
},
});
And then, use
| pretty size in your template directive to change the kilobytes value to your formatted string, for example if the data is in the template variable
kilobytes:
<td>[% kilobytes | pretty_size %]</td>