Indent::String - Class for text indenting.
use Indent::String; my $indent = Indent::String->new(%parameters); $indent->indent('text text text');
new(%parameters)
Constructor.
line_size
Sets indent line size value. Default value is 79.
next_indent
Sets output separator between indented datas for string context. Default value is "\t" (tabelator).
output_separator
Output separator between data in scalar context. Default value is "\n" (new line).
indent($data, [$indent, $non_indent])
Indent text by words to line_size block size. $act_indent - Actual indent string. Will be in each output string. $non_indent - Is flag for non indenting. Default is 0.
new(): From Class::Utils::set_params(): Unknown parameter '%s'. From Indent::Utils::line_size_check(): 'line_size' parameter must be a positive number. line_size => %s
# Pragmas. use strict; use warnings; # Modules. use Indent::String; # Object. my $i = Indent::String->new( 'line_size' => 20, ); # Indent. print $i->indent(join(' ', ('text') x 7))."\n"; # Output: # text text text text # <--tab->text text text
Class::Utils, Indent::Utils, Readonly.
Indent, Indent::Block, Indent::Data, Indent::Utils.
https://github.com/tupinek/Indent
Michal Špaček mailto:skim@cpan.org
http://skim.cz
BSD license.
0.01
To install Indent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Indent
CPAN shell
perl -MCPAN -e shell install Indent
For more information on module installation, please visit the detailed CPAN module installation guide.