In perl.git, the branch vincent/faster-PathTools has been created
<http://perl5.git.perl.org/perl.git/commitdiff/98a1fe26771ca2fe3c29ffd9260f09cd8e55e321?hp=0000000000000000000000000000000000000000>
at 98a1fe26771ca2fe3c29ffd9260f09cd8e55e321 (commit)
- Log -----------------------------------------------------------------
commit 98a1fe26771ca2fe3c29ffd9260f09cd8e55e321
Author: Vincent Pit <[email protected]>
Date: Thu Apr 26 19:36:11 2012 +0200
Turn the few lone tabs into spaces
M dist/Cwd/lib/File/Spec/Unix.pm
commit d389fef94adbc6d908cd68a38d5af4e58154836a
Author: Vincent Pit <[email protected]>
Date: Thu Apr 26 19:30:43 2012 +0200
Simplify the third regexp of File::Spec::Unix::canonpath()
At the second regexp, any path looking like './././xx' gets turned into
'./xx', so there is no need to look for several './' at the beginning of
the path anymore. This means that '(?:\./)+' can be simplified into '\./'.
This also makes it more clear why '././' is not turned into the empty
string by the third regexp even though it is not equal to './'.
Also remove the /s flag, as there is no '.' (sic) in the regexp.
M dist/Cwd/lib/File/Spec/Unix.pm
commit 4ab77a476329c06b8d3a3902b9a4f9ebe96678ff
Author: Vincent Pit <[email protected]>
Date: Thu Apr 26 18:53:21 2012 +0200
Merge two substitutions in one in File::Spec::Unix::canonpath()
Now that the comment was corrected, it is obvious that the two
substitutions can be merged.
I suspect that that '$' is wrong and should be a '\z' but, knowing
File::Spec, I'm pretty sure someone somewhere relies on this.
M dist/Cwd/lib/File/Spec/Unix.pm
commit 41878af9357feb649f530b685621599cf73d0032
Author: Vincent Pit <[email protected]>
Date: Thu Apr 26 18:47:58 2012 +0200
Fix a comment in File::Spec::Unix::canonpath()
The code was not doing what the comment was describing, and I believe the
code is right here ('/../xx' should be turned into '/xx' and not into 'xx').
M dist/Cwd/lib/File/Spec/Unix.pm
commit 325335d0b4100c7668b25bfcdcdb32f1973a1291
Author: Vincent Pit <[email protected]>
Date: Thu Apr 26 17:47:39 2012 +0200
Conditionally compile QNX/NTO code in File::Spec::Unix::canonpath()
File::Spec::Unix::canonpath() does a platform run-time check at each
invocation to apply a QNX/NTO hack. As this is not needed on plain Unix
systems, the check can be moved to a constant so that the special code
can be optimized away by constant folded.
This seems to yield a 25% speedup for each call to canonpath().
M dist/Cwd/lib/File/Spec/Unix.pm
-----------------------------------------------------------------------
--
Perl5 Master Repository