Changeset 442851e3eb7e0bc3110fdcf4c0ebd8b24ae7d863

Show
Ignore:
Timestamp:
06/16/08 14:55:45 (7 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1213628145 +0000
git-parent:

[a71565ce200771459236516fe3a1d0a010d993ea]

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

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

Files:

Legend:

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

    rd01e61a r442851e  
    8181    $class =~ s/::/\//g; 
    8282    my $file = $INC{"$class.pm"}; 
     83    # Deal with modules loaded from a LIB directory and not in 
     84    # lib/Resmon/Module: try MODNAME.pm instead of Resmon/Module/MODNAME.pm 
     85    unless ($file) { 
     86        $class =~ s/^.*\/([^\/]+)$/\1/; 
     87        $file = $INC{"$class.pm"}; 
     88    } 
    8389    print STDERR "Reloading module: $class\n"; 
    8490#    my $fh = FileHandle->new($file);