Buffer::Transactional::Buffer - A role to represent a buffer


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

Index


Code Index:

NAME

Top

Buffer::Transactional::Buffer - A role to represent a buffer

DESCRIPTION

Top

This is a role to represent our buffer types.

METHODS

Top

put ( @items )

This method is required, it is used to add elements to the buffer.

as_string

This method is required, it is used to collapse a buffer into a string.

subsume ( $buffer )

This method has a minimal implementation which simply puts the results of calling to_string on the $buffer arg into the local buffer. Feel free to override this if it is not appropriate, see Buffer::Transactional::Buffer::Lazy for an example of this.

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;
use Moose::Role;

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

requires 'put';
requires 'as_string';

sub subsume {
    my ($self, $buffer) = @_;
    $self->put( $buffer->as_string );
}

no Moose::Role; 1;

__END__