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




  • Re: Cache::FastMmap and Win32

    Written by Anonymous Coward (0) on Tue Nov 28 14:55:11 2006

    MANIFEST file misses win32.c file, so .tar.gz misses it too.

    Can you repack this distro including win32.c?

    -- STRO@CPAN

    • Re: Re: Cache::FastMmap and Win32

      Written by Ash Berlin (bfc7465ebdca5337) on Wed Nov 29 13:50:56 2006

      Oops. not having much luck with that file.

      Done and reupdated blog. Will also mention on RT ticket.