/[pxelator]/lib/PXElator/client.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/client.pm

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

revision 509 by dpavlin, Sat Jan 2 15:47:39 2010 UTC revision 510 by dpavlin, Wed Jul 21 16:49:29 2010 UTC
# Line 62  sub conf { Line 62  sub conf {
62                  write_file $path, $default;                  write_file $path, $default;
63                  warn "default $path = $default";                  warn "default $path = $default";
64                  $value = $default;                  $value = $default;
65            } elsif ( -l $path ) {
66                    $value = readlink $path;
67          } elsif ( -f $path ) {          } elsif ( -f $path ) {
68                  $value = read_file $path;                  $value = read_file $path;
69                  chomp $value;                  chomp $value;
# Line 78  sub all_conf { Line 80  sub all_conf {
80          foreach my $file ( glob("$path/*"), glob("$path/*/*") ) {          foreach my $file ( glob("$path/*"), glob("$path/*/*") ) {
81                  my $name = $file;                  my $name = $file;
82                  $name =~ s{^$path/+}{} || die "can't remove $path from $name";                  $name =~ s{^$path/+}{} || die "can't remove $path from $name";
83                  $conf->{ $name } = read_file $file if -f $file;                  $conf->{ $name } =
84                            -l $file ? readlink  $file :
85                            -f $file ? read_file $file :
86                            '?';
87          }          }
88          return $conf;          return $conf;
89  }  }

Legend:
Removed from v.509  
changed lines
  Added in v.510

  ViewVC Help
Powered by ViewVC 1.1.26