[Catalyst] FastMmap via Cygwin
Joseph
joseph.r.hamilton at gmail.com
Tue May 15 03:02:36 GMT 2007
I'm wrestling with Catalyst under Cygwin. I wanted to play/prototype
in that environment. I have the Catalyst Tutorial working, but with a
few jury-rigged changes. I imagine there may be a better way to "fix"
things...
I have taken Cache::FastMmap v1.15 (from Ash Berlin) and installed it
under Cygwin (do forgive me).
I got Cache::FastMmap and Catalyst::Plugin::Session::Store::FastMmap
to test cleanly. These were holding up the Tutorial since
Cache::FastMmap v1.14 wouldn't pass tests. Specifically, it wouldn't
delete files properly. Version 1.15 seemed to address this. At least
it passed all tests and then all the Catalyst::Tutorial tests passed.
However... when I got to the point in the tutorial (authentication)
that seems to make use of this, things did not work.
The trouble appears to be within CreateFile. The test files create
just a file under /tmp. This works. But creating
/tmp/myapp/session_data fails. The directory /tmp/myapp is created.
But the error claims it cannot find the path specified.
Furthermore, the directories created under /tmp aren't removed,
neither of the sessionstoretest directories nor /tmp/myapp.
The tests (SessionStoreTest and SessionStoreTest2) for some odd
reason don't attempt to create files in the directories created. For
example, /tmp/sessionstoretest is created due to
Catalyst::Plugin::Session::Store::FastMmap->setup_session creating a
directory per class. But the test provided for
Catalyst::Plugin::Session::Store::FastMmap provides a tmpfile. I don't
know exactly who to address this to, but I imagine it would help if
Catalyst::Plugin::Session::Store::FastMmap tested things the way that
are used "normally" for Catalyst.
What is very strange to me is that it works at all for the
/tmp/ItPb33AIjK but not for /tmp/myapp/session_data. Why can CreateFile
find D:/cygwin/tmp/ItPb33AiJK when referred as /tmp/ItPb33AiJK but trip
up for the directory /tmp/myapp?
Anyone have any idea?
I can get around it by hard-coding Catalyst::Utils->class2tempdir
such that the default temp directory is d:/cygwin/tmp rather than /tmp.
It seems enormously strange to have to do this. But it works.
I hesitated changing from CreateFile to fopen since I don't fully
appreciate the true problem. Furthermore, I wanted to get back to
slogging through the Catalyst tutorial (almost done now).
I'm not using modperl (yet). I'm simply calling
script/myapp_server.pl via the Cygwin bash shell.
More information about the Catalyst
mailing list