The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Log::Parallel::Sql::Trim - chop extra long strings to byte limit

SYNOPSIS

 use Log::Parallel::Sql::Trim;

 $shorter = encode_and_trim($longer, $length_limit);

DESCRIPTION

This chops a string to a length. It considers the length to be a byte limit, but it chops based on characters. It also encodes the string in UTF-8. This is useful for storing strings in a database with a limited field length.

LICENSE

This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.