Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mason::compilation(3pm) [debian man page]

Mason::Compilation(3pm) 				User Contributed Perl Documentation				   Mason::Compilation(3pm)

NAME
Mason::Compilation - Performs compilation of a single component DESCRIPTION
A new "Mason::Compilation" object is created by Mason::Interp to compile each component. This class has no public API at this time. MODIFIABLE METHODS
These methods are not intended to be called externally, but may be useful to modify with method modifiers in plugins and subclasses. Their APIs will be kept as stable as possible. bad_attribute_names () A list of attribute names that should not be used because they are reserved for built-in attributes or methods: "args", "m", "cmeta", "render", "main", etc. bad_method_names () A list of method names that should not be used because they are reserved for built-in attributes: "args", "m", "cmeta", etc. Not as extensive as bad_attribute_names above because methods like "render" and "main" can be overridden but make no sense as attributes. compile () The top-level method called to compile the component. Returns the generated component class. named_block_types () An arrayref of valid named block types: "after", "filter", "method", etc. Add to this list if you want to create your own named blocks (i.e. blocks that take a name argument). output_class_footer () Perl code to be added at the bottom of the class. Empty by default. output_class_header () Perl code to be added at the top of the class, just after initialization of Moose, $m and other required pieces. Empty by default. # Add to the top of every component class: # use Foo; # use Bar qw(baz); # override 'output_class_header' => sub { return join(" ", super(), 'use Foo;', 'use Bar qw(baz);'); }; process_perl_code ($coderef) This method is called on each distinct piece of Perl code in the component. $coderef is a reference to a string containing the code; the method can modify the code as desired. See Mason::Plugin::DollarDot for a sample usage. unnamed_block_types () An arrayref of valid unnamed block types: "args", "class", "init", etc. Add to this list if you want to create your own unnamed blocks. valid_flags () An arrayref of valid flags: contains only "extends" at time of writing. Add to this list if you want to create your own flags. SEE ALSO
Mason AUTHOR
Jonathan Swartz <swartz@pobox.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 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.14.2 2012-05-02 Mason::Compilation(3pm)

Check Out this Related Man Page

Mason::Manual::RequestDispatch(3pm)			User Contributed Perl Documentation		       Mason::Manual::RequestDispatch(3pm)

NAME
Mason::Manual::RequestDispatch - How request paths get mapped to page components DESCRIPTION
Given the request path /news/sports/hockey Mason searches for the following components in order, setting $m->path_info as noted. /news/sports/hockey.{mp,mc} /news/sports/hockey/index.{mp,mc} /news/sports/hockey/dhandler.{mp,mc} /news/sports/dhandler.{mp,mc} # $m->path_info = hockey /news/sports.{mp,mc} # $m->path_info = hockey (but see next section) /news/dhandler.{mp,mc} # $m->path_info = sports/hockey /news.{mp,mc} # $m->path_info = sports/hockey (but see next section) /dhandler.{mp,mc} # $m->path_info = news/sports/hockey where ".{mp,mc}" means either ".mp" (indicating a pure-perl component). or ".mc" (indicating a top-level component). The following sections describe these elements in more detail. Autoextended path The request path is suffixed with ".mp" and ".mc" to translate it to a component path. /news/sports/hockey.{mp,mc} Index An index matches its exact directory, nothing underneath. /news/sports/hockey/index.{mp,mc} Dhandlers A dhandler matches its directory as well as anything underneath, setting "$m->path_info" to the remainder. /news/sports/hockey/dhandler.{mp,mc} /news/sports/dhandler.{mp,mc} # $m->path_info = hockey /news/dhandler.{mp,mc} # $m->path_info = sports/hockey /dhandler.{mp,mc} # $m->path_info = news/sports/hockey Partial paths A component can match an initial part of the URL, setting "$m->path_info" to the remainder: /news/sports.{mp,mc} # $m->path_info = hockey /news.{mp,mc} # $m->path_info = sports/hockey Since this isn't always desirable behavior, it must be explicitly enabled for the component. Mason will call method "allow_path_info" on the component class, and will only allow the match if it returns true: <%class> method allow_path_info { 1 } </%class> The default "allow_path_info" returns false. "allow_path_info" is not checked on dhandlers, since the whole point of dhandlers is to match partial paths. Routes It is possible to use route syntax to more elegantly parse "$m->path_info" for dhandlers and partial paths, e.g. <%class> route "{year:[0-9]+}/{month:[0-9]{2}}"; </%class> See Mason::Plugin::RouterSimple. SEE ALSO
Mason AUTHOR
Jonathan Swartz <swartz@pobox.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 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.14.2 2012-05-02 Mason::Manual::RequestDispatch(3pm)
Man Page