Document::Transform::Transformer - A document transformer. More than meets the eye. Or not.
version 1.110530
use Document::Transform::Transformer; use MyTypeLib(':all'); my $transformer = Document::Transform::Transformer->new ( document_constraint => Document, transform_constraint => Transform, ); my $altered = $transformer->transform($document, $transforms);
Need a simple transformer that mashes up a transform and a document into something awesome? This is your module then.
This is the default for Document::Transformer to use. It expects data structures that align with whatever type constraints are passed into the constructor that represent a Document and a Transform. It implements the interface role Document::Transform::Role::Transformer
is: ro, isa: Moose::Meta::TypeConstraint, required: 1
The default Transformer must have the constraints supplied to it via constructor. This constraint should check for whatever is a valid Document for the backend.
The default Transformer must have the constraints supplied to it via constructor. This constraint should check for whatever is a valid Transform for the backend.
(Document, ArrayRef[Transform])
transform takes a Document and an array of Transforms and performs the operations contained with the transforms against the document. Returns the transformed document.
The type constraints for Document and Transform are stored in the attributes "document_constraint" and "transform_constraint", respectively.
Nicholas R. Perez <nperez@cpan.org>
This software is copyright (c) 2010 by Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Document::Transform, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Document::Transform
CPAN shell
perl -MCPAN -e shell install Document::Transform
For more information on module installation, please visit the detailed CPAN module installation guide.