/[pxelator]/lib/PXElator/config.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

Contents of /lib/PXElator/config.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 74 - (show annotations)
Fri Jul 31 13:16:11 2009 UTC (12 years, 1 month ago) by dpavlin
File size: 297 byte(s)
move shared (between processes) configuration files into own package

1 package config;
2
3 use warnings;
4 use strict;
5
6 use server;
7 use File::Slurp;
8
9 sub shared {
10 my ($name, $value) = @_;
11
12 my $path ="$server::base_dir/conf/$server::ip/$name";
13 if ( defined $value ) {
14 write_file $path, $value;
15 } else {
16 $value = read_file $path if -e $path;
17 }
18 return $value;
19 }
20
21 1;

  ViewVC Help
Powered by ViewVC 1.1.26