File Coverage

blib/lib/Erlang/Parser/Node.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             # Copyright 2011-2012 Yuki Izumi. ( anneli AT cpan DOT org )
2             # This is free software; you can redistribute it and/or modify it under the
3             # same terms as Perl itself.
4              
5             package Erlang::Parser::Node;
6              
7 3     3   2929 use Moose::Role;
  3         8794  
  3         10  
8              
9             requires qw/print/;
10              
11             =head1 NAME
12              
13             Erlang::Parser::Node - performed by all AST nodes
14              
15             =head1 SYNOPSIS
16              
17             package Erlang::Parser::Node::Quux;
18              
19             use Moose;
20             with 'Erlang::Parser::Node';
21              
22             =head1 DESCRIPTION
23              
24             L<Erlang::Parser::Node> is the L<Moose::Role> performed by all L<Erlang::Parser> AST nodes. So far, it requires one definition to be provided by the class performing it; C<print>, which takes a filehandle, and pretty-prints the node contents (in Erlang) to it.
25              
26             It provides no (!) function of its own, other than ensuring all AST nodes know how to pretty-print themselves, and providing a type-name in the Moose type hierarchy; see L<Moose::Util::TypeConstraints>.
27              
28             =cut
29              
30             1;
31              
32             # vim: set sw=4 ts=4: