NAME

autobox::Text - turns baubles into trinkets

SYNOPSIS

use autobox::Text;

my $text = "Some text";
my $wrapped = $text->wrap(60);
my $bullets = $text->bulletize('*');

DESCRIPTION

This module extends scalars and arrays with a set of convenient text-processing methods using autobox.

METHODS

SCALAR->wrap([$columns])

Wraps a long string into multiple lines. Defaults to 80 columns if no column width is provided. Uses Text::Wrap.

SCALAR->unwrap

Removes wrapping by joining each paragraph into a single line, preserving paragraph breaks.

SCALAR->bulletize([$bullet, $format])

Adds bullet characters or numeric markers to each line. By default, uses a hyphen -. If $bullet contains digits, numeric bulleting is applied using a format string (default: "%i. %s"). For non-numeric bullets, format string defaults to "%s %s".

SCALAR->unbulletize

Removes leading bullet characters (*, -, _) or numeric markers from each line of a bulletized list. Does not impact numbered lists

SCALAR->trim

Removes leading and trailing whitespace from a string.

SCALAR->tidy

Performs multiple cleanup operations:

  • Strips leading and trailing whitespace.

  • Collapses multiple tabs and spaces into one

  • Collapses three or more consecutive newlines into two.

SEE ALSO

autobox, Text::Wrap, String::Truncate

AUTHOR

<Your Name Here>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.