Help for this page
use Food::Product; my $p = new Food::Product('Tomato') or die("Could not instance Food::Product: ($Food::Product::errstr)" +); ... $p->stock(450); $p->sell(450) or die($p->errstr); $p->sell(40) or die($p->errstr);
package Food::Product; use strict; ... $self->stock($left_over); }