Show
Ignore:
Timestamp:
05/12/10 16:19:33 (5 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1273681173 +0000
git-parent:

[4b03439f3c0c4e08baf8f3e43a60b4cb36394ebd]

git-author:
Mark Harrison <mark@omniti.com> 1273681173 +0000
Message:

Change the check data structure from a list to a hash.

This means that if a particular check is loaded twice (Same module, same check
name), the most recently loaded one will take precedence. This allows included
files to override default behavior with certain checks if required.

git-svn-id: https://labs.omniti.com/resmon/branches/resmon2@372 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Resmon/Config.pm

    r4b03439 r4f6b9a6  
    5151                    next; 
    5252                } 
    53                 push(@{$self->{Module}->{$current}}, $object)
     53                $self->{Module}->{$current}->{$check_name} = $object
    5454            } elsif (/^\s*\}\s*$/) { 
    5555                $current = undef; 
     
    8383                    next; 
    8484                } 
    85                 $self->{Module}->{$current} ||= []
     85                $self->{Module}->{$current} ||= {}
    8686                next; 
    8787            }