File::Spec is in included with the standard perl mods I believe so dependencies shouldn't be a problem.
> I see. You're right, this is actually much nicer! > > Sorry for the misinformation. On debian it return : also. I made a > mistake checking it. > > But with the suggested code by Per it works just fine: > > sub load { > my $module=@_[0]; > $module = File::Spec->catfile(split /::/, $module); > $module .= '.pm'; > > eval { require $module; }; > > return $@ ? 1 : 0; > } > > Of course one has to put a use File::Spec at the beginning and a Per > Finar Ellefsen