1Config::Model::ListId(3U)ser Contributed Perl DocumentatiCoonnfig::Model::ListId(3)
2
3
4

NAME

6       Config::Model::ListId - Handle list element for configuration model
7

VERSION

9       version 1.205
10

SYNOPSIS

12        $model ->create_config_class
13         (
14          ...
15          element
16          => [
17              bounded_list
18              => { type => 'list',
19                   max_index => 123,
20                   max_nb => 2 ,
21                   cargo_type => 'leaf',
22                   cargo_args => {value_type => 'string'},
23                 },
24             ]
25         ) ;
26

DESCRIPTION

28       This class provides list elements for a Config::Model::Node.
29

CONSTRUCTOR

31       ListId object should not be created directly.
32

List model declaration

34       See model declaration section from Config::Model::AnyId.
35

Methods

37   get_type
38       Returns "list".
39
40   fetch_size
41       Returns the nb of elements of the list.
42
43   load(string)
44       Store a set of values passed as a comma separated list of values.
45       Values can be quoted strings. (i.e ""a,a",b" will yield "('a,a', 'b')"
46       list).
47
48   store_set(@v)
49       Store a set of values (passed as list)
50
51   push( value )
52       push some value at the end of the list.
53
54   swap ( ida, idb )
55       Swap 2 elements within the array
56
57   remove ( idx )
58       Remove an element from the list. Equivalent to "splice @list,$idx,1"
59
60   load_data ( array_ref | data )
61       Clear and load list from data contained in the array ref. If a scalar
62       or a hash ref is passed, the list is cleared and the data is stored in
63       the first element of the list.
64

AUTHOR

66       Dominique Dumont, (ddumont at cpan dot org)
67

SEE ALSO

69       Config::Model::Model, Config::Model::Instance, Config::Model::AnyId,
70       Config::Model::HashId, Config::Model::Value
71
72
73
74perl v5.12.1                      2010-08-18          Config::Model::ListId(3)
Impressum