Subverting case insensitivity for module names under Mac HFS

Shevek shevek at
Tue Jun 24 02:52:11 BST 2008

On Mon, 2008-06-23 at 10:52 +0100, Andy Wardley wrote:
> I'm trying to write some code that will automagically load plugin modules on
> demand but I'm being thwarted by the case insensitivity of Apple's HFS.
> Case insensitivity is a Good Thing in this case.  I would like a user to be
> able to write:
>    [% USE wibble %]

Ignoring the fact that this looks desperately like Symbol::Approx::Sub
(or whatever it's called now), I suggest looking for the stash on
successful load:

CHANCE: { exists $::{$_} and last CHANCE for @possibilities;
die "crap! he got me"; }

I'd have written "exists $::{Wibble}" but all Perl should read like a
Mills and Boon novel.


More information about the mailing list