+/* require doesn't search for absolute names, or when the name is
+ explicity relative the current directory */
+PERL_STATIC_INLINE bool
+S_path_is_searchable(const char *name)
+{
+ PERL_ARGS_ASSERT_PATH_IS_SEARCHABLE;
+
+ if (PERL_FILE_IS_ABSOLUTE(name)
+#ifdef WIN32
+ || (*name == '.' && ((name[1] == '/' ||
+ (name[1] == '.' && name[2] == '/'))
+ || (name[1] == '\\' ||
+ ( name[1] == '.' && name[2] == '\\')))
+ )
+#else
+ || (*name == '.' && (name[1] == '/' ||
+ (name[1] == '.' && name[2] == '/')))
+#endif
+ )
+ {
+ return FALSE;
+ }
+ else
+ return TRUE;
+}
+