SGML::Simple::BuilderBuilder - build a simple transformation package
use SGML::SPGroveBuilder; use SGML::Grove; use SGML::Simple::Spec; use SGML::Simple::SpecBuilder; use SGML::Simple::BuilderBuilder; $spec_grove = SGML::SPGroveBuilder->new ($spec_sysid); $spec = SGML::Simple::Spec->new; $spec_grove->accept (SGML::Simple::SpecBuilder->new, $spec); $builder = SGML::Simple::BuilderBuilder->new (spec => $spec [, eval_output => $fh]); $grove = SGML::SPGroveBuilder->new ($sysid); $object_tree_root = My::Object->new(); $grove->accept ($builder->new, $object_tree_root);
BuilderBuilder returns the package name of a package built using a specification read from a specification file. The key `spec' contains the specification. The key `eval_output' is either a file handle or a scalar reference, instead of evaluating generated code BuilderBuilder will print to or append to `eval_output', respectively.
BuilderBuilder
spec
eval_output
Passing a new ``builder'' to accept_gi of a grove will cause an output object tree to be generated under $object_tree_root using the builder.
accept_gi
$object_tree_root
Builder packages are all singletons, calling new always returns the same object.
Builder
new
Ken MacLeod, ken@bitsko.slc.ut.us
perl(1), SGML::Grove(3), SGML::Simple::Spec(3), SGML::Simple::SpecBuilder(3)
To install SGML::Grove, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SGML::Grove
CPAN shell
perl -MCPAN -e shell install SGML::Grove
For more information on module installation, please visit the detailed CPAN module installation guide.