X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/6b4cefaabd92d7056651a627267df0abc4f92b3d..f91fd6d772ee8ea35f833802c9f8cc1db75ca950:/Shiar_Sheet/Keyboard.pm diff --git a/Shiar_Sheet/Keyboard.pm b/Shiar_Sheet/Keyboard.pm index e8e33aa..aecd0bc 100644 --- a/Shiar_Sheet/Keyboard.pm +++ b/Shiar_Sheet/Keyboard.pm @@ -29,13 +29,11 @@ sub new { croak 'No key definitions specified' unless ref $self->{def} eq 'HASH'; $self->{map} ||= 'qwerty'; - my $parent = (caller)[0]; # calling module - my $sign = do { - no strict 'refs'; # temporarily allow variable references - \%{ $parent.'::sign' }; # return %sign from parent + $self->{sign} ||= do { + require Shiar_Sheet::KeySigns; + Shiar_Sheet::KeySigns->VERSION(1.03); + \%Shiar_Sheet::KeySigns::sign; }; - croak "%${parent}::sign not found" unless %$sign; - $self->{sign} = $sign; bless $self, $class; }