perlancar > Data-Sah-0.30 > Data::Sah::Compiler::TextResultRole

Download:
Data-Sah-0.30.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.30   Source  

NAME ^

Data::Sah::Compiler::TextResultRole - Role for compilers that produce text result (array of lines)

VERSION ^

This document describes version 0.30 of Data::Sah::Compiler::TextResultRole (from Perl distribution Data-Sah), released on 2014-10-23.

ATTRIBUTES ^

indent_character => STR

METHODS ^

$c->add_result($cd, @arg)

Append result to $cd->{result}. Will use $cd->{indent_level} to indent the line. Used by compiler; users normally do not need this.

$c->inc_indent($cd)

Increase indent level. This is done by increasing $cd->{indent_level} by 1.

$c->dec_indent($cd)

Decrease indent level. This is done by decreasing $cd->{indent_level} by 1.

$c->indent_str($cd)

Shortcut for $c->indent_character x $cd->{indent_level}.

$c->indent($cd, $str) => STR

Indent each line in $str with indent_str and return the result.

HOMEPAGE ^

Please visit the project's homepage at https://metacpan.org/release/Data-Sah.

SOURCE ^

Source repository is at https://github.com/perlancar/perl-Data-Sah.

BUGS ^

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Sah

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR ^

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by perlancar@cpan.org.

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

syntax highlighting: