+
+ *{ $package . '::' . $attribute . '_in_hours' } = sub {
+ my ($self, $value) = @_;
+
+ $self->$attribute(int($value * 60 + 0.5)) if @_ > 1;
+ return $self->$attribute / 60.0;
+ };
+
+ *{ $package . '::' . $attribute . '_in_hours_as_number' } = sub {
+ my ($self, $value) = @_;
+
+ my $sub = "${attribute}_in_hours";
+
+ $self->$sub($::form->parse_amount(\%::myconfig, $value)) if @_ > 1;
+ return $::form->format_amount(\%::myconfig, $self->$sub, 2);
+ };