Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed fact resolution. It works now!

  • Loading branch information...
commit 2aa1f71542e3fb01308854ddbfb1aec413ff4d00 1 parent 20bab96
@cosimo authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/Facter/Util/Fact.pm
View
10 lib/Facter/Util/Fact.pm
@@ -76,7 +76,7 @@ method value {
return;
}
- self.searching(sub {
+ $!value = self.searching(sub {
Facter.debug("Facter::Util::Fact.value for $!name. Searching.");
@@ -141,9 +141,12 @@ method searching (Sub $block) {
Facter.debug("Facter::Util::Fact.searching for $!name: start");
- gather {
+ my @fact-values = gather {
+ #Facter.debug("- Block is " ~ $block.perl);
my $next-value = $block();
- Facter.debug("- Got next value: $next-value");
+ #Facter.debug("- 1 Got next value: " ~ $next-value ~ " (" ~ $next-value.perl ~ ")");
+ $next-value = $next-value();
+ #Facter.debug("- 2 Got next value: " ~ $next-value ~ " (" ~ $next-value.perl ~ ")");
take $next-value;
$!searching = False;
};
@@ -154,5 +157,6 @@ method searching (Sub $block) {
# @searching = false
#end;
+ return @fact-values;
}
Please sign in to comment.
Something went wrong with that request. Please try again.