Skip to content

Commit

Permalink
Warnings avoidance for reloading a module not in %INC
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmv committed Apr 22, 2011
1 parent c38a14c commit 40de516
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Module/Refresh.pm
Expand Up @@ -93,7 +93,9 @@ sub refresh_module_if_modified {
return $self->new if !%CACHE;
my $mod = shift;

if ( !$CACHE{$mod} ) {
if (!$INC{$mod}) {
return;
} elsif ( !$CACHE{$mod} ) {
$self->update_cache($mod);
} elsif ( $self->mtime( $INC{$mod} ) ne $CACHE{$mod} ) {
$self->refresh_module($mod);
Expand Down

0 comments on commit 40de516

Please sign in to comment.