1HTML::FormFu::Deflator:U:sCeormpCoounntdrSipbluitte(d3H)PTeMrLl::DFoocrummFeun:t:aDteifolnator::CompoundSplit(3)
2
3
4

NAME

6       HTML::FormFu::Deflator::CompoundSplit - CompoundSplit deflator
7

VERSION

9       version 2.07
10

SYNOPSIS

12           ---
13           element:
14             - type: Multi
15               name: address
16
17               elements:
18                 - name: number
19                 - name: street
20
21               deflator:
22                 - type: CompoundSplit
23
24           # set the default
25
26           $form->get_field('address')->default( $address );
27

DESCRIPTION

29       Deflator to allow you to set several field's values at once.
30
31       For use with a HTML::FormFu::Element::Multi group of fields.
32
33       A default value passed to the Multi field will be split according to
34       the "split" setting, and its resulting parts passed to its child
35       elements.
36

METHODS

38   split
39       Arguments: $regex
40
41       Default Value: "qr/ +/"
42
43       Regex used to split the default value. Defaults to a regex matching 1
44       or more space characters.
45
46   join
47       Arguments: $string
48
49       Default Value: ' '
50
51       If splitting the value results in more parts than there are fields, any
52       extra parts are joined again to form the value for the last field. The
53       value of "join" is used to join these values.
54
55       Defaults to a single space.
56
57       For example, if the Multi element contains fields "number" and "name",
58       and is given the value "10 Downing Street"; when split this results in
59       3 parts: 10, "Downing" and "Street". In this case, the 1st part, 10 is
60       assigned to the first field, and the 2nd and 3rd parts are re-joined
61       with a space to give the single value "Downing Street", which is
62       assigned to the 2nd field.
63
64   field_order
65       Arguments: \@order
66
67       If the parts from the split value should be assigned to the fields in a
68       different order, you must provide an arrayref containing the names, in
69       the order they should be assigned to.
70
71           ---
72           element:
73             - type: Multi
74               name: address
75
76               elements:
77                 - name: street
78                 - name: number
79
80               deflator:
81                 - type: CompoundSplit
82                   field_order:
83                     - number
84                     - street
85

AUTHOR

87       Carl Franks
88

LICENSE

90       This library is free software, you can redistribute it and/or modify it
91       under the same terms as Perl itself.
92

AUTHOR

94       Carl Franks <cpan@fireartist.com>
95
97       This software is copyright (c) 2018 by Carl Franks.
98
99       This is free software; you can redistribute it and/or modify it under
100       the same terms as the Perl 5 programming language system itself.
101
102
103
104perl v5.38.0                      2023-H0T7M-L2:0:FormFu::Deflator::CompoundSplit(3)
Impressum