projects
/
pxelator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebf398c
)
refresh $package::debug from shared state on filesystem
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 19 Aug 2009 12:45:07 +0000
(12:45 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 19 Aug 2009 12:45:07 +0000
(12:45 +0000)
lib/PXElator/server.pm
patch
|
blob
|
history
diff --git
a/lib/PXElator/server.pm
b/lib/PXElator/server.pm
index
9fc536f
..
52a9edb
100644
(file)
--- a/
lib/PXElator/server.pm
+++ b/
lib/PXElator/server.pm
@@
-24,8
+24,15
@@
our $conf = "$base_dir/conf/$ip";
mkdir $conf unless -e $conf;
use Module::Refresh qw//;
-sub refresh { Module::Refresh->refresh };
-
+sub refresh {
+ Module::Refresh->refresh;
+ my $from = (caller(1))[3];
+ $from =~ s{^(\w+)::.+$}{$1};
+ my $eval = '$' . $from . '::debug = server::debug();';
+ warn "refresh $eval\n";
+ eval $eval;
+ warn $@ if $@;
+};
mkdir $_ foreach grep { ! -d $_ } map { "$conf/$_" } ( 'ip', 'mac' );