sub new {
my $class = shift;
- my $self = $class->SUPER::new();
-
- $self->{'_PARAMS'} = {'FOO' => [42, 'This is the FOO parameter, twiddle it to do stuff']};
- bless($self, $class);
- $self->_prepare_parameters();
-
- return $self;
+ my $self = $class->SUPER::new(
+ _PARAMS => {'FOO' => [42, 'This is the FOO parameter, twiddle it to do stuff']},
+ @_,
+ );
+ return bless($self, $class);
}
-b) as seen in the example above, after declaring the parameter hash, call the
-method _prepare_parameters() on your class instance. This will convert the
-hash into the internally used data structure and prepare it for automatic
-loading and saving.
-
-c) to access one of the parameters, call the _getval() method, giving the name
+b) to access one of the parameters, call the _getval() method, giving the name
of the parameter as first argument. This will return the current value of that
-parameter (either the default value or the user defuned value).
+parameter (either the default value or the user defined value).