Skip to content
Snippets Groups Projects
Commit 442851e3 authored by Mark Harrison's avatar Mark Harrison
Browse files

Fix a problem reloading modules included from a different dir specified by the

LIB config option.


git-svn-id: https://labs.omniti.com/resmon/trunk@125 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
parent a71565ce
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,12 @@ sub reload_module {
my $class = ref($self) || $self;
$class =~ s/::/\//g;
my $file = $INC{"$class.pm"};
# Deal with modules loaded from a LIB directory and not in
# lib/Resmon/Module: try MODNAME.pm instead of Resmon/Module/MODNAME.pm
unless ($file) {
$class =~ s/^.*\/([^\/]+)$/\1/;
$file = $INC{"$class.pm"};
}
print STDERR "Reloading module: $class\n";
# my $fh = FileHandle->new($file);
# local($/);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment