Changeset 40149ad2c37d1c645665233f767d278f159b9dd5
- Timestamp:
- 05/21/08 21:45:22
(5 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
| ra55933e |
r40149ad |
|
| 82 | 82 | my $file = $INC{"$class.pm"}; |
|---|
| 83 | 83 | print STDERR "Reloading module: $class\n"; |
|---|
| 84 | | my $fh = FileHandle->new($file); |
|---|
| 85 | | local($/); |
|---|
| | 84 | # my $fh = FileHandle->new($file); |
|---|
| | 85 | # local($/); |
|---|
| 86 | 86 | my $redef = 0; |
|---|
| 87 | 87 | local($SIG{__WARN__}) = sub { |
|---|
| … | … | |
| 92 | 92 | warn @_; |
|---|
| 93 | 93 | }; |
|---|
| 94 | | eval <$fh>; |
|---|
| | 94 | # eval <$fh>; |
|---|
| | 95 | do($file); |
|---|
| 95 | 96 | return $@ if $@; |
|---|
| 96 | 97 | return $redef; |
|---|