- Timestamp:
- 06/29/05 16:46:56 (19 years ago)
- Location:
- trunk/lib/Text
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Text/FormBuilder.pm
r87 r88 198 198 push @{ $self->{form_spec}{fields} }, { %{$_} } foreach @{ $$line[1]{group} }; 199 199 } elsif ($$line[0] eq 'field') { 200 #die $$line[1] unless ref $$line[1]; 200 201 push @{ $self->{form_spec}{fields} }, { %{$$line[1]} }; 201 202 } … … 1349 1350 =head2 Language/Parser 1350 1351 1351 Make sure that multiple runs of the parser don't share data.1352 1353 1352 Pieces that wouldn't make sense in a group field: size, row/col, options, 1354 1353 validate. These should cause C<build> to emit a warning before ignoring them. … … 1370 1369 1371 1370 =head1 BUGS 1372 1373 Creating two $parsers in the same script causes the second one to get the data1374 from the first one.1375 1371 1376 1372 Placing C<fields> in a C<!fb> directive does not behave as expected (i.e. they -
trunk/lib/Text/FormBuilder/grammar
r87 r88 37 37 38 38 form_spec: 39 { 40 %formspec = (); # clear the old formspec data 39 { 40 # clear out old data, so we don't end up with old data in new objects 41 @lines = (); 42 @sections = (); 43 %formspec = (); 41 44 } 42 45 (list_def | description_def | group_def | note | fb_params | unknown_block_directive | line)(s) … … 52 55 } 53 56 57 # make copies instead of taking references, again so we 58 # don't end up with connections between objects 54 59 $return = { 55 60 fb_params => $formspec{fb_params}, … … 57 62 author => $formspec{author}, 58 63 description => $formspec{description}, 59 lists => \%lists, 60 patterns => \%patterns, 61 subs => \%subs, 62 groups => \%groups, 63 sections => \@sections, 64 ( @submit ? 65 (submit => @submit == 1 ? $submit[0] : \@submit) : 66 () 67 ), 64 lists => { %lists }, 65 patterns => { %patterns }, 66 subs => { %subs }, 67 groups => { %groups }, 68 sections => [ @sections ], 69 ( @submit ? (submit => @submit == 1 ? $submit[0] : [ @submit ]) : () ), 68 70 reset => $formspec{reset}, 69 71 } … … 233 235 @options = (); 234 236 237 #warn "$$field{name}: $field"; 238 235 239 $field; 236 240 }
Note: See TracChangeset
for help on using the changeset viewer.