35 |
$class =~ s{^lib/}{}; |
$class =~ s{^lib/}{}; |
36 |
$class =~ s{\.pm$}{}; |
$class =~ s{\.pm$}{}; |
37 |
$class =~ s{/}{::}g; |
$class =~ s{/}{::}g; |
38 |
if ( $class =~ m{Mojo} ) { |
if ( 0 && $class =~ m{Mojo} ) { # FIXME remove dead code |
39 |
$self->TODO( "Mojo support" ); |
$self->TODO( "Mojo support" ); |
40 |
return; |
return; |
41 |
} |
} |
61 |
my $path = $class; |
my $path = $class; |
62 |
$path =~ s{::}{/}g; |
$path =~ s{::}{/}g; |
63 |
$path .= '.pm'; |
$path .= '.pm'; |
64 |
$path = $INC{$path}; |
if ( defined $INC{$path} ) { |
65 |
warn "# $class from INC $path"; |
$path = $INC{$path}; |
66 |
$class_path->{$class} = $path || confess "can't find path for $class"; |
warn "# $class from INC $path"; |
67 |
|
$class_path->{$class} = $path; |
68 |
|
} else { |
69 |
|
confess "can't find path for $class"; |
70 |
|
} |
71 |
} |
} |
72 |
return $class_path->{$class}; |
return $class_path->{$class}; |
73 |
} |
} |