[html-formfu] filename case

Carl Franks fireartist at gmail.com
Fri Aug 17 10:06:01 GMT 2007


Ok, there's just 1 more issue that I can think of that needs addressed
before a CPAN release.

I'm not entirely happy with all element filenames being lowercase, and
everything else being CamelCaps.
What I think would be better, would be to have all files under:
   Elements/
   Deflators/
   Filters/
   Constraints/
   Inflators/
   Validators/
   Transformers/
to be lowercase - but let users write it in any case they want.

Performance isn't really an issue with this change.
Most people are likely to be running under a persistent environment,
and so using HTML::FormFu::Preload to load all the packages at
run-time. (the cat controller loads Preload for you).

The way I see it working is to lc() the given name and check for it in %INC.
If it's not there, check %INC case-insensitively.
If it's not there, attempt to require the module using the lc'd name.
If it's not found, attempt to load the module using the given name in
the original case.

For anyone running with Preload, the correct module will be found,
already loaded, at the first step.
This will also handle non-core/custom modules using non-lowercase filenames.

If we go ahead with this, it really ought to be before a CPAN release,
as it would cause quite a few problems - and would require users to
manually delete the old files from their @INC paths.

I don't know whether svn has fixed the issue with filename case
changes on windows - if not, you'll need to delete the effected files
before running `svn up`.

Any objections to me going ahead with this?
Am I being over the top, thinking this is an issue at all?

Cheers,
Carl



More information about the HTML-FormFu mailing list