sub get_price{
my $self = shift;
my $base_price = $self->{_quantity} * $self->{_item_price};
my $discount_factor = $base_price > 1000 ? 0.95 : 0.98;
return $base_price * $discount_factor;
}
####
sub get_price{
my $self = shift;
return $self->base_price() * $self->discount_factor();
}
sub base_price{
my $self = shift;
return $self->{_quantity} * $self->{_item_price};
}
sub discount_factor{
my $self = shift;
return $self->base_price > 1000 ? 0.95 : 0.98;
}
####
perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(join(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'