HTML::Mason::Lexer man page on Alpinelinux

Man page or keyword search:  
man Server   18016 pages
apropos Keyword Search (all sections)
Output format
Alpinelinux logo
[printable version]

HTML::Mason::Lexer(3) User Contributed Perl DocumentationHTML::Mason::Lexer(3)

NAME
       HTML::Mason::Lexer - Generates events based on component source lexing

VERSION
       version 1.54

SYNOPSIS
	 my $lexer = HTML::Mason::Lexer->new;

	 $lexer->lex( comp_source => $source, name => $comp_name, compiler => $compiler );

DESCRIPTION
       The Lexer works in tandem with the Compiler to turn Mason component
       source into something else, generally Perl code.

       As the lexer finds component elements, like a tag or block, it calls
       the appropriate event methods in the compiler object it was given.

       It has only a few public methods.

       You can replace this lexer with one of your own simply by telling the
       Compiler to use a different lexer class.	 Your lexer class simply needs
       to call the appropriate methods in the Component Class's API as it
       scans the source.

METHODS
       The lexer has very few public methods.

       new This method creates a new Lexer object.  This methods takes no
	   parameters.

       lex ( comp_source => ..., name => ..., compiler => ... )
	   This method tells the lexer to start scanning the given component
	   source.  All of these parameters are required.  The "name"
	   parameter will be used in any error messages generated during
	   lexing.  The "compiler" object must be an object that implements
	   the Mason Component API.

       line_number
	   The current line number that the lexer has reached.

       name
	   The name of the component currently being lexed.

       throw_syntax_error ($error)
	   This throws an "HTML::Mason::Exception::Syntax" error with the
	   given error message as well as additional information about the
	   component source.

	   This method is used by both the Lexer and the Compiler.

SUBCLASSING
       Any subclass of the lexer should declare itself to be a subclass of
       "HTML::Mason::Lexer", even if it plans to override all of its public
       methods.

       If you want your subclass to work with the existing Compiler classes in
       Mason, you must implement the methods listed above.  If you plan to use
       a custom Compiler class that you're writing, you can do whatever you
       want.

       We recommend that any parameters you add to Lexer be read-only, because
       the compiler object_id is only computed once on creation and would not
       reflect any changes to Lexer parameters.

SEE ALSO
       Mason

AUTHORS
       ·   Jonathan Swartz <swartz@pobox.com>

       ·   Dave Rolsky <autarch@urth.org>

       ·   Ken Williams <ken@mathforum.org>

COPYRIGHT AND LICENSE
       This software is copyright (c) 2012 by Jonathan Swartz.

       This is free software; you can redistribute it and/or modify it under
       the same terms as the Perl 5 programming language system itself.

perl v5.18.2			  2014-01-19		 HTML::Mason::Lexer(3)
[top]

List of man pages available for Alpinelinux

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net