Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: Win32::MMF - Memory Mapped File Support for Perl

by xiper (Friar)
on Feb 11, 2004 at 04:31 UTC ( [id://328144]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use IPC::Shareable;
    
    ...
    # complex method
    tie( $scalar, 'IPC::Shareable', 'varid', { ...options... } );  # OR
    tie( $scalar, 'IPC::Shareable', { key => 'varid', ...options... } );
    
  2. or download this
    use Win32::MMF::Shareable;
    
    ...
    tie( $scalar, 'Win32::MMF::Shareable', 'varid', { ...options... } );  
    +# OR
    tie( $scalar, 'Win32::MMF::Shareable', { key => 'varid', ...options...
    + } );
    # for compatibility
    
  3. or download this
    use Win32::MMF::Shareable;
    
    ...
    tie( $bigvar1, 'Win32::MMF::Shareable', 'bigvar1' );
    tie( $bigvar2, 'Win32::MMF::Shareable', 'bigvar2' );
    tie( $bigvar3, 'Win32::MMF::Shareable', 'bigvar3' );
    
  4. or download this
    tie( $scalar, 'Win32::MMF::Shareable', { namespace => 'ns1', key => 'f
    +oo' } );
    tie( $scalar, 'Win32::MMF::Shareable', { namespace => 'ns1', key => 'b
    +ar' } );
    tie( $scalar, 'Win32::MMF::Shareable', { namespace => 'ns2', key => 'f
    +oo' } );
    tie( $scalar, 'Win32::MMF::Shareable', { namespace => 'ns2', key => 'b
    +ar' } );
    
  5. or download this
    # Process 1
    use Win32::MMF::Shareable;
    ...
    # get the current value of another processes tied variable!
    my $server = Win32::MMF->new( -namespace => "shareable", reuse => 1 );
    + 
    my @current_queue = $server->getvar( 'queue' );
    
  6. or download this
    tie( $var, 'Win32::MMF::Shareable', 'var' );  # OR
    tie( $var, 'Win32::MMF::Shareable', 'var', { connect => 'auto' } );  #
    + map if already available, otherwise create
    tie( $var, 'Win32::MMF::Shareable', 'var', { connect => 1 } ); # must 
    +already exist
    tie( $var, 'Win32::MMF::Shareable', 'var', { connect => 0 } ); # must 
    +not already exist
    
  7. or download this
    $data = tie( %data, 'Win32::MMF::Shareable', 'data', { timeout => 60 }
    + );
    if( $data->{error} ) { die( “can't tie data: ” . $data->{errstr} ) }  
    +# maybe? or just return undef
    ...
    
      $data->unlock();
    }
    
  8. or download this
    use japh; print;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://328144]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-24 04:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found