[Jifty-commit] r1214 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Jun 8 16:29:09 EDT 2006
Author: clkao
Date: Thu Jun 8 16:29:05 2006
New Revision: 1214
Modified:
jifty/trunk/lib/Jifty/Everything.pm
Log:
Avoid hundreds of backtict pwd happening in load time, this halves
BTDT::Test loading. Those `pwd`s are coming from Module::Pluggable's
abs2rel calls.
Modified: jifty/trunk/lib/Jifty/Everything.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Everything.pm (original)
+++ jifty/trunk/lib/Jifty/Everything.pm Thu Jun 8 16:29:05 2006
@@ -9,6 +9,16 @@
=cut
+use Cwd ();
+BEGIN {
+ # Cwd::cwd() insists doing `pwd`, which is a few hundres of shell
+ # outs just in the BEGIN time for Module::Pluggable to load things.
+ if ($^O ne 'MSWin32') {
+ require POSIX;
+ *Cwd::cwd = *POSIX::getcwd;
+ }
+}
+
use Jifty ();
use Jifty::I18N ();
use Jifty::Dispatcher ();
More information about the Jifty-commit
mailing list