File Coverage

blib/lib/Sieve/Generator/Text.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 11 11 100.0


line stmt bran cond sub pod time code
1 1     1   447 use v5.36.0;
  1         3  
2             package Sieve::Generator::Text 0.001;
3             # ABSTRACT: role for objects that render as inline Sieve text fragments
4              
5 1     1   4 use Moo::Role;
  1         1  
  1         26  
6              
7             #pod =head1 DESCRIPTION
8             #pod
9             #pod This role is consumed by all objects that render as inline Sieve text
10             #pod fragments — portions of a line rather than complete lines, used as arguments
11             #pod and test expressions. It requires a single method, C.
12             #pod
13             #pod This role isn't really meant to be used directly, and should be considered an
14             #pod implementation detail that may go away.
15             #pod
16             #pod =method as_sieve
17             #pod
18             #pod my $sieve_text = $text_obj->as_sieve;
19             #pod my $sieve_text = $text_obj->as_sieve($indent_level);
20             #pod
21             #pod This method renders the object as a string of Sieve code. The optional
22             #pod C<$indent_level> argument is a non-negative integer controlling the
23             #pod indentation depth; each level adds two spaces. If not given, no indenting is
24             #pod added.
25             #pod
26             #pod =cut
27              
28             requires 'as_sieve';
29              
30 1     1   380 no Moo::Role;
  1         2  
  1         2  
31             1;
32              
33             __END__