Embperl - building dynamic websites with Perl


Methods
[ << Prev: Defining your own Syntax ] [ Content ] [ Next: Syntax Structure and Parameter >> ]



Embperl::Syntax -> new / $self -> newtop

Create a new syntax class. This method should only be called inside a constructor of a derived class.



$self -> AddToRoot ($elements)top

This adds a new element to the root of the parser tree. $elements must be a hashref. See Embperl::Syntax::ASP for an example.



$self -> AddInitCode ($compiletimecode, $initcode, $termcode, $procinfo)top

This gives you the possibility to add some Perl code, that is always executed at the beginning of a document ($initcode), at the end of the document ($termcode) or at compile time ($compiletimecode). The three strings must be valid Perl code. See Embperl::Syntax::SSI for an example. $procinfo is a hashref that can consits of additional processor infos (see below) for the document.



$self -> GetRoottop

Returns the root of the parser tree.



Embperl::Syntax::GetSyntax ($name, $oldname)top

Returns a syntax object which is build form the syntaxes named in $name. If $oldname is given, $name can start with a + or - to add or subtract a syntax. This is normally only needed by Embperl itself or to implement a syntax switch statement (see Embperl::Syntax::SSI for an example.)



$self -> CloneHash ($old, $replace)top

Clones a hash which is given as hashref in $old, optional replace the tags given in the hashref $replace and return a hashref to the new hash.


[ << Prev: Defining your own Syntax ] [ Content ] [ Next: Syntax Structure and Parameter >> ]


© 1997-2023 Gerald Richter / actevy