X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData.pm;h=a90149aea9097e00625338c73953d0d6908372fa;hb=fb6a4e3d1893cf394778dcae77db790f4571b4a2;hp=1b2492cc28c6a07dc927edf30d4039ec9fe1e1eb;hpb=a2c3d44b8c6965cfa9ccc1a30473381724657f32;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index 1b2492c..a90149a 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -4,16 +4,17 @@ use warnings; use parent qw/Exporter/; use JSON qw/encode_json decode_json/; - use Redis; +use Sub::Name qw/subname/; our $contest; my $redis = Redis->new; my $pubsub = Redis->new; sub dynsub{ + our ($name, $sub) = @_; no strict 'refs'; - *{$_[0]} = $_[1]; + *$name = subname $name => $sub } BEGIN {