Here's my code. I hope you understand most of it:
#ifdef WIN32 if (strcmp(name + len - 3, ".pm")) { char *pkg; int slash_count = 0, i = 0; for (i = 0; i < len - 3; i++) { if (name[i] == '/') slash_count++; } /* "Foo/Bar.pm" + 1 (slash) - 3 (".pm") + 1 ("\0") */ pkg = malloc(sizeof(char) * (len + slash_count - 3 + 1)); slash_count = 0; for (i = 0; i < len - 3; i++) { if (name[i] == '/') { pkg[i + slash_count] = ':'; pkg[i + ++slash_count] = ':'; } else pkg[i + slash_count] = name[i]; } pkg[i + slash_count] = '\0'; if (!gv_stashpv(pkg, FALSE)) Perl_warner(aTHX_ WARN_MISC, "Package %s not found (did yo +u use the incorrect case?)", pkg); } #endif
_____________________________________________________
Jeff japhy Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
In reply to Re: Re: Re: Re: Re: use Module and case-insensitive file names
by japhy
in thread use Module and case-insensitive file names
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |