in reply to Re: Re: Re: Re: Re: use Module and case-insensitive file names
in thread use Module and case-insensitive file names

The value of name coming in, that's a relative file name that will be searched for on the @INC list?

if (strcmp(name + len - 3, ".pm")) { Should be _stricmp, since it might be ".PM" etc.

Also, what if the name's length is less than three?

sizeof char is 1, by definition.

This will warn any time a .pm file doesn't define a package with the same name, so its applicability is not just Win32 case differences. It can be more generally useful, as I mused in another message.

—John

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: use Module and case-insensitive file names
by japhy (Canon) on Jul 31, 2001 at 02:22 UTC
    Ok, I'll add that 3-character check, and the use of strcasecmp().

    _____________________________________________________
    Jeff japhy Pinyan: Perl, regex, and perl hacker.
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;