NAME

XAS::Lib::Mixins::Bufops - A class for the XAS environment

SYNOPSIS

 use XAS::Class
   debug   => 0,
   version => '0.01',
   base    => 'XAS::Base',
   mixin   => 'XAS::Lib::Mixins::Bufops',
 ;

 my $buffer = "this is a buffer",

 my $word = $self->buf_get_line(\$buffer, ' ');

DESCRIPTION

This module performs some common operations on buffers.

METHODS

buf_get_line(\$buffer, $eol)

This method returns a "line" from a buffer.

$buffer

A pointer to a buffer.

$eol

A delimiter to search for. This denotes the end of the line.

buf_slurp(\$buffer, $length)

This method will extract a chunk from the buffer. The buffer will shrink by that amount.

$buffer

A pointer to a buffer.

$length

The length of the chunk.

SEE ALSO

XAS

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2014 Kevin L. Esteb

This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.