Buffer::Transactional::Buffer::String - A simple string buffer


Buffer-Transactional documentation Contained in the Buffer-Transactional distribution.

Index


Code Index:

NAME

Top

Buffer::Transactional::Buffer::String - A simple string buffer

BUGS

Top

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.

AUTHOR

Top

Stevan Little <stevan.little@iinteractive.com>

COPYRIGHT AND LICENSE

Top


Buffer-Transactional documentation Contained in the Buffer-Transactional distribution.

package Buffer::Transactional::Buffer::String;
use Moose;

our $VERSION   = '0.02';
our $AUTHORITY = 'cpan:STEVAN';

has '_buffer' => (
    traits  => [ 'String' ],
    reader  => 'as_string',
    writer  => '_buffer',
    isa     => 'Str',
    lazy    => 1,
    default => sub { '' },
    handles => {
        '_add_to_buffer' => 'append'
    }
);

# *sigh* Moose
with 'Buffer::Transactional::Buffer';

sub put { (shift)->_add_to_buffer( join "" => @_ ) }

__PACKAGE__->meta->make_immutable;

no Moose; 1;

__END__