Permalink
Browse files

Fixed badly defined .suitable member (would recurse infinitely)

  • Loading branch information...
1 parent b0106a3 commit 20bab96c29a5db1f36bb9f8e98990447fda7cf47 @cosimo committed Dec 2, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/Facter/Util/Resolution.pm
View
7 lib/Facter/Util/Resolution.pm
@@ -14,6 +14,7 @@ class Facter::Util::Resolution;
#equire 'rbconfig'
has $!value is rw;
+has $!suitable is rw;
has $.code is rw;
has $.interpreter is rw;
@@ -128,10 +129,10 @@ method setcode($string = "", $interp = "", $block) {
# Is this resolution mechanism suitable on the system in question?
method suitable {
- unless defined $.suitable {
- $.suitable = ! (any(@.confines) == False);
+ unless $!suitable.defined {
+ $!suitable = (any(@.confines) == False) ?? 0 !! 1;
}
- return $.suitable;
+ return $!suitable;
}
method to_s {

0 comments on commit 20bab96

Please sign in to comment.