/[libconf]/libconf/perl-Libconf/templates/samba_template.pm
ViewVC logotype

Diff of /libconf/perl-Libconf/templates/samba_template.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by dams, Thu Mar 13 09:00:23 2003 UTC revision 1.6 by dams, Sun May 25 12:41:09 2003 UTC
# Line 40  $templates{samba} = { Line 40  $templates{samba} = {
40                                             $atom->{type} = 'KEY_VALUE';                                             $atom->{type} = 'KEY_VALUE';
41                                             $atom->{key} = $1;                                             $atom->{key} = $1;
42                                             $atom->{value} = $2;                                             $atom->{value} = $2;
43                                             $out->{current_section} and $atom->{sections} = [ $out->{current_section} ];                                             $atom->{sections} = [ @{$out->{current_sections}} ];
44                                             $matched = 1;                                             $matched = 1;
45                                         }                                         }
46                                       ),                                       ),
# Line 48  $templates{samba} = { Line 48  $templates{samba} = {
48                                         if ($in =~ s/^\s*\[([^\]]+)\]\s*$//) {                                         if ($in =~ s/^\s*\[([^\]]+)\]\s*$//) {
49                                             $atom->{type} = 'SECTION';                                             $atom->{type} = 'SECTION';
50                                             $atom->{section_name} = $1;                                             $atom->{section_name} = $1;
51                                             $out->{current_section} = { name => $1 };                                             $atom->{sections} = [ ];
52                                               $out->{current_sections} = [ { name => $1 } ];
53                                             $matched = 1;                                             $matched = 1;
54                                         }                                         }
55                                       ),                                       ),
# Line 64  $templates{samba} = { Line 65  $templates{samba} = {
65                                            return $INDENT_SPACES x $out->{current_indentation} . qq($key = $value\n);                                            return $INDENT_SPACES x $out->{current_indentation} . qq($key = $value\n);
66                                        ),                                        ),
67                                        SECTION => q(                                        SECTION => q(
68                                            my $indent = $INDENT_SPACES x ($out->{current_indentation} ||= 1);                                            $out->{current_indentation} ||= 1;
69                                            return $indent . qq([$atom->{section_name}]\n);                                            return qq([$atom->{section_name}]\n);
70                                        ),                                        ),
71                                       },                                       },
72                             edit_atom => q(                             edit_atom => q(

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26