package Parent; our $knob = 1; sub knob { my $class = shift; $knob = $_[0] if @_; return $knob; } package Child; use base 'Parent'; # inherits knob method