Modify readme for plugins
authorRalf Ertzinger <ralf@skytale.net>
Tue, 30 Apr 2013 13:40:50 +0000 (15:40 +0200)
committerRalf Ertzinger <ralf@skytale.net>
Tue, 30 Apr 2013 13:40:50 +0000 (15:40 +0200)
videosite/readme.txt

index 943e430..697ff42 100644 (file)
@@ -143,20 +143,13 @@ declared as follows:
 
 sub new {
     my $class = shift;
 
 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
 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).