package Context; use strict; use StrategyIF; sub new { my $class = shift; my $self = {}; $self->{StrategyIF} = shift; bless $self, $class; } sub compute { my $self = shift; $self->{StrategyIF}->operation(); } 1;