/[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.8 by dams, Thu Jul 10 22:31:57 2003 UTC revision 1.9 by dams, Sat Jul 12 14:18:00 2003 UTC
# Line 87  $templates{samba} = { Line 87  $templates{samba} = {
87                                           @{@{$out->{atoms}}[$index]}{keys(%args)} = values(%args)                                           @{@{$out->{atoms}}[$index]}{keys(%args)} = values(%args)
88                                         ),                                         ),
89                            find_atom_pos => q(                            find_atom_pos => q(
90                                               my $i = 0;                                               $first_atom ||= 0;
91                                                 $last_atom ||= @{$out->{atoms}}-1;
92                                               my @res;                                               my @res;
93                                               foreach my $atom (@{$out->{atoms}}) {                                               foreach my $pos ($first_atom..$last_atom) {
94                                                     my $atom = $out->{atoms}->[$pos];
95                                                   my $flag = 1;                                                   my $flag = 1;
96                                                   foreach (keys(%args)) {                                                   foreach (keys(%args)) {
97                                                       if ($_ eq "sections") {                                                       if ($_ eq 'sections') {
98                                                           $atom->{sections}[0]{name} eq $args{sections}->[0]{name} or $flag = 0;                                                           $atom->{sections}[0]{name} eq $args{sections}->[0]{name} or $flag = 0;
99                                                       } else {                                                       } else {
100                                                           $atom->{$_} eq $args{$_} or $flag = 0;                                                           $atom->{$_} eq $args{$_} or $flag = 0;
101                                                       }                                                       }
102                                                   }                                                   }
103                                                   $flag and push(@res, $i);                                                   $flag and push(@res, $pos);
                                                  $i++;  
104                                               }                                               }
105                                               wantarray ? @res : $res[-1];                                               wantarray ? @res : $res[-1];
106                                             ),                                             ),

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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