PrePAN

Sign in to PrePAN

Text::Indent::Simple simple indentation

Good

Synopsis

    # Setup the indentation of 4 spaces and automatical line ending.
    use Text::Indent::Simple;
    my $indent = Text::Indent::Simple->new(
        size => 4,
        eol => 1,
    );

    # Print somthing starting from the level 1.
    $indent->over;
    $indent->printf("Hello, world!");
    $indent->back;

Description

This module is designed to print indented texts produced by many modules that could not know about other modules. Once configured the indentation will be common for all modules printing indented texts.

This module is designed to be used in the simplest way as much as possible. It provides some methods to handle with indentation. Also it doesn't require any extra modules.

Comments

Please sign up to post a review.