File Coverage

blib/lib/XML/Toolkit/Generator.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package XML::Toolkit::Generator;
2             {
3             $XML::Toolkit::Generator::VERSION = '0.15';
4             }
5 2     2   4819 use Moose;
  2         6  
  2         20  
6 2     2   17473 use XML::SAX::Writer;
  2         7  
  2         101  
7 2     2   15 use namespace::autoclean;
  2         4  
  2         25  
8              
9             has output => (
10             isa => 'ArrayRef',
11             is => 'ro',
12             required => 1,
13             auto_deref => 1,
14             );
15              
16             has engine => (
17             does => 'XML::Toolkit::Generator::Interface',
18             is => 'ro',
19             required => 1,
20             handles => { render_object => 'parse' },
21             );
22              
23             __PACKAGE__->meta->make_immutable;
24             1;
25             __END__
26              
27             =head1 NAME
28              
29             XML::Toolkit::Generator - A set of tools for converting Moose Objects into XML
30              
31             =head1 VERSION
32              
33             version 0.15
34              
35             =head1 SYNOPSIS
36              
37             use XML::Toolkit::Generator;
38             my $generator = XML::Toolkit::Generator->new(engine => $engine);
39             $generator->render_object( $object );
40             say for $generator->output;
41              
42             =head1 ATTRIBUTES
43              
44             =over
45              
46             =item output - Output Buffer
47              
48             An ArrayRef that contains all of the output.
49              
50             =item engine - An XML::Toolkit::Generator Engine
51              
52             This must do the XML::Toolkit::Generator::Interface. This is the class that
53             introspects Moose Objects and converts them into a SAX Stream. It defaults to
54             XML::Toolkit::Generator::Default.
55              
56             =back
57              
58             =head1 INCOMPATIBILITIES
59              
60             None reported.
61              
62             =head1 BUGS AND LIMITATIONS
63              
64             No bugs have been reported.
65              
66             Please report any bugs or feature requests to
67             C<bug-xml-toolkit@rt.cpan.org>, or through the web interface at
68             L<http://rt.cpan.org>.
69              
70             =head1 AUTHOR
71              
72             Chris Prather C<< <chris@prather.org> >>
73              
74             =head1 LICENCE AND COPYRIGHT
75              
76             Copyright (c) 2008, Chris Prather C<< <chris@prather.org> >>. Some rights reserved.
77              
78             This module is free software; you can redistribute it and/or
79             modify it under the same terms as Perl itself. See L<perlartistic>.