NAME

SGML::Simple::BuilderBuilder - build a simple transformation package

SYNOPSIS

    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);

DESCRIPTION

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.

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.

Builder packages are all singletons, calling new always returns the same object.

AUTHOR

Ken MacLeod, ken@bitsko.slc.ut.us

SEE ALSO

perl(1), SGML::Grove(3), SGML::Simple::Spec(3),
SGML::Simple::SpecBuilder(3)