git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
66b5d05
)
Modify readme for plugins
author
Ralf Ertzinger
<ralf@skytale.net>
Tue, 30 Apr 2013 13:40:50 +0000
(15:40 +0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Tue, 30 Apr 2013 13:40:50 +0000
(15:40 +0200)
videosite/readme.txt
patch
|
blob
|
history
diff --git
a/videosite/readme.txt
b/videosite/readme.txt
index
943e430
..
697ff42
100644
(file)
--- a/
videosite/readme.txt
+++ b/
videosite/readme.txt
@@
-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 def
u
ned value).
+parameter (either the default value or the user def
i
ned value).