package Community::Storage; use strict; our $VERSION = '1.0'; sub new { my $class = shift; my $self = {}; bless($self, $class); load($_[0], $self) if @_; return $self; } sub load { # hashref auslesen und speichern my ($args, $self) = @_; if ($args) { for (keys %{$args}) { $self->{$_} = $args->{$_}; } } } sub param { # wert zurückliefern my $self = shift; return $self->{@_}; } sub add { # neue Daten aufnehmen my $self = shift; my ($name, $value) = @_; $self->{$name} = $value; } 1;