in reply to (Updated Again) Win32::MMF - Memory Mapped File Support for Perl

I have been watching the recent development of this module with much interest - it fills a hole nicely on win32 that has sorely been missing (not to mention perfectly answers my recent question). I downloaded and compiled v0.03 today (after installing whew!), but ran out of time to play with it. Now i see v0.04 is on CPAN... i'll have a look tomorrow.

I have a couple of suggestions:

  • a tie() interface
    I can't imagine it'd be much more work, but an (additional) interface that would allow you to tie() an arbitrarily complex variable to shared memory would allow cross-platform developers to simply
    tie( $variable, $^O eq 'MSWin32' ? 'Win32::MMF' : 'IPC::Shareable', { ... } );
    Ideally it would accept the same options as IPC::Shareable, even if they're just aliases. I know this is very similar to what the module currently does, but having the tie keyword in your code makes it easier to understand what's happening. And i think this would be an even more 'programmer-friendly' interface (nothing wrong with the current one), as it hides virtually _all_ complexity. Tie a hash, fork, update it in one process, the other process can see the changes. Or tie separately in two different processes. Also makes for easier 'inter-process signalling' (via do{} while ! $share, or Tk's waitVariable()).

  • binary and/or ppm package
    Given this is win32 we're talking about, it might be a good idea to host a binary and/or a ppm package somewhere for those that don't have access to multi-billion-dollar windows compilers and/or the knowledge required. :) Just a thought.

    - ><iper

    use japh; print;