OO Perl Script to calculate depreciation using different accounting methods