NAME
Win32::StrictFileNames - Enable case sensitive filenames checking.
SYNOPSIS
use Win32::StrictFileNames;
DESCRIPTION
In Windows, the directories and files names are case-insensitive. That can be bothersome, for example, if one develops a cgi script that must also turn under an *nix machine: it is necessary to verify the case of all the filenames and paths carefully. There is also the typos in the modules names: for instance, if you type in a script use tk;
instead of use Tk;
you obtain a bunch of error messages unrelated with the typo.
With this module, if the name of a file doesn't match (in a case-sensitive manner) the one of the system, a diagnostic message is printed (or the function that uses this filename fails).
Strict checking
It's the default behaviour of the module. For instance, with this script:
#!/usr/bin/perl -w
use strict;
use Win32::StrictFileNames;
use tk; # <-- there is a typo here
my $mw = MainWindow->new();
MainLoop();
we obtain the error message:
Can't locate tk.pm in @INC ...etc
and the compilation is aborted as usual.
Warnings
With the warn
option, the compilation is not aborted but a detailed diagnostic message is issued.
#!/usr/bin/perl -w
use strict;
use Win32::StrictFileNames 'warn';
use tk; # <-- there is a typo here
my $mw = MainWindow->new();
MainLoop();
gives the warning message:
Warning: case sensitive mismatch between
File =C:\perl\site\lib\tk.pm
Long =C:\perl\site\lib\Tk.pm
Short=C:\perl\site\lib\Tk.pm
at C:\tmp\test.pl line 4.
File
is the pathname of the file to load, Long
is the longpathname (composed of longname components) and Short
is the shortpathname (composed only of short (8.3) path components).
EXPORT
Nothing.
SEE ALSO
Home page: http://www.bribes.org/perl/wstrictfilenames.html
BUGS
None currently known.
Caution: this module has not been tested intensively ;-)
AUTHOR
Jean-Louis Morel, <jl_morel@bribes.org>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Jean-Louis Morel.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.