Changeset 40149ad2c37d1c645665233f767d278f159b9dd5

Show
Ignore:
Timestamp:
05/21/08 21:45:22 (6 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1211406322 +0000
git-parent:

[a55933e19f2f2e67eebba5b63eb7cd6dd671c2ec]

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

Using eval to reload modules causes problems with Switch.pm and case, using
do() instead.

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

Files:

Legend:

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

    ra55933e r40149ad  
    8282    my $file = $INC{"$class.pm"}; 
    8383    print STDERR "Reloading module: $class\n"; 
    84     my $fh = FileHandle->new($file); 
    85     local($/); 
     84#    my $fh = FileHandle->new($file); 
     85#    local($/); 
    8686    my $redef = 0; 
    8787    local($SIG{__WARN__}) = sub { 
     
    9292        warn @_; 
    9393    }; 
    94     eval <$fh>; 
     94#    eval <$fh>; 
     95    do($file); 
    9596    return $@ if $@; 
    9697    return $redef;