summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2009-05-31 02:58:21 +0300
committerTzafrir Cohen <tzafrir@cohens.org.il>2009-05-31 02:58:21 +0300
commitd5981392882621b17b3699441b2d9832919173c2 (patch)
tree849044c5ca7fab66f083849689c046b5ddb5f06c
parent8b7c5c8a672db7a31eca9344af42ea5145b808fb (diff)
more documentation clarifications
-rw-r--r--lib/Asterisk/config.pm38
1 files changed, 25 insertions, 13 deletions
diff --git a/lib/Asterisk/config.pm b/lib/Asterisk/config.pm
index 2bdd7e8..a1b1b79 100644
--- a/lib/Asterisk/config.pm
+++ b/lib/Asterisk/config.pm
@@ -749,8 +749,9 @@ Returns the section as a hash of key=>value pairs.
$sip_conf->fetch_values_arrayref(section=>[section name|unsection],
key=>key name);
-return referenced value list, if section name unreachable return
-failed. if key name unreachable return failed.
+Returns a (reference to a) list of all the values a specific keys have
+in a specific section. referenced value list, Returns 0 if section
+was not found or key was not found in the section.
=head2 reload
@@ -790,19 +791,29 @@ replace new data when matched.
=head2 assign_append
+Used to add extra data to an existing section or to edit it.
+
$sip_conf->assign_append(point=>['up'|'down'|'foot'],
section=>[section name],
data=>'key=value'|['key=value','key=value']|{key=>'value',key=>'value'});
-append data around with section name.
+This form is used to merely append new data.
=over 3
-=item * point -> append data C<up> / C<down> / C<foot> with section.
+=item point
+
+Append data C<up> / C<down> / C<foot> with section.
+
+=item section
+
+Matched section name, expect 'unsection'. If ommited, data will be
+placed above first setcion, as in 'unsection', but then you cannot
+use C<point=>"foot">.
-=item * section -> matched section name, expect 'unsection'.
+=item data
-=item * data -> new replace data in string/array/hash.
+New replace data in string/array/hash.
=back
@@ -811,20 +822,21 @@ append data around with section name.
comkey=>[key,value],
data=>'key=value'|['key=value','key=value']|{key=>'value',key=>'value'};
-append data around with section name and key/value in same section.
+Appends data before, after or instead a given line. The line is
+the first line in C<section> where the key is C<key> and the value
+is C<value> (from C<comkey>.
=over 2
-=item * point -> C<over> will overwrite with key/value matched.
+=item point
-=item * comkey -> match key and value.
+C<over> will overwrite with key/value matched.
-=back
+=item comkey
- $sip_conf->assign_append(point=>'up'|'down',
- data=>'key=value'|['key=value','key=value']|{key=>'value',key=>'value'});
+Match key and value.
-simple append data without any section.
+=back
=head2 assign_replacesection