in reply to Refactoring a Moose Class

You've gotten off to the totally wrong tack. You say use Mooose, but then you proceed in a pre-Moose style, directly manipulating the $self hash.

Presumably you want a price attribute, so describe it with Moose:

has 'price' => (isa => 'Int', is => 'rw', required => 1);

Assuming you're requiring the user program to specify a price when they create a Checkout object. Or maybe it has a default price?

or maybe you want a variety of classes: apples, oranges, bananas, cans of tomato soup, each of which has its own price. When you go up to the checkout with your shopping cart, the checkout processes the items one by one, asks it its price, and calculates the total.

Details are good, but so is the overview. When you 'create the object', then think about how you're going to invoke the object, how you're goign to manipulate it.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.