- SEE ALSO
- COPYRIGHT AND LICENSE
MySQL::Slurp::Writer - Adds buffering / locking writing to MySQL::Slurp
my $writer = MySQL::Slurp::Writer->new( ... ); $writer->print( "records\tto\tprint\n" );
This module wraps IO::File to provide a thread-safe method for writing to a file handles. The method is simple ... writing is buffered; the file handle is locked; the output is written to the file handle, the lock is released.
Create a new MySQL::Slurp::Writer object
The size of the buffer. The default is 1 record, i.e. no buffering.
The filename of the IO::File object
Write arguments to the buffer and if the buffer is full, commit to the file handle
Flush the buffer
Closes the writing file handle
Block until an exclusive lock can be made on the file handle
Release the lock
- item Generalize to object independent of MySQL::Slurp
Christopher Brown, <email@example.com<gt>
Copyright (C) 2008 by Open Data
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.