If you don't supply an import method for a package, it fails silently without warning. This goes for packages that... well... don't exist at all.

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.