I don't quite understand the problem.
From the OP: Internally, I use / as a separator whenever possible. For path strings I get from the "outside", I use File::Spec to be OS independent.
Do any paths come from somewhere else, that you can't keep track of and normalize? My point is that Path::Class, just as File::Spec which it uses internally, expects Unix style paths when run on Unix, and Windows style paths when run on Windows, unless you tell it otherwise. So for new never-before-seen paths you do
and once they're internal, you just domy $path = dir($from_outside)->as_foreign('Unix');
Is this unapplicable to your problem?my $path = foreign_dir('Unix', $internal);
lodin
In reply to Re^3: CPAN Module for mixing Unix/Windows path
by lodin
in thread CPAN Module for mixing Unix/Windows path
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |