Cache::FastMmap and Win32
A while back I was attempting to produce a Win32 PAR of a Catalyst app I am developing so that the "designer" could take my half-arsed attempt at HTML styling and make it look all swish and polished. (Well that was the idea anyway.)
The one major problem with porting a Cat app to Win32 was Cache::FastMmap
(which is used via Catalyst::Plugin::Session::Store::FastMmap) doesn't support
native Win32 (it might work under cygwin, but i was hoping for native/Vanilla
perl support.) Well, it didn't until last week anyway, when I finally found
the time to write native Win32 support using a joyous mis-mash of
CreateFileMapping and MapViewOfFile. Until Rob Mueller responds and
applies my patch I have a dist of it here.
On a related note, if anyone can tell me how to make ExtUtils::MakeMaker use different .c/.o files depending on the platform, I would appreciate it.
Edit: including different object files is easy. It just helps to remember that
Makefile.PL is just perl code (sounds silly I know - quite obvious in
hindsight,) so just do
'OBJECT' => 'CImpl.o mmap_cache.o ' . ($^O eq 'MSWin32' ? 'win32.o' : 'unix.o')
That was simple.
I have repackaged and updated to include win32.c which I missed, and removed
evilness of including .c files. The above link is still correct
Comments on Cache::FastMmap and Win32 | 2 comments | Post a comment