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::Filters::Standard(3pm)				User Contributed Perl Documentation			     Mason::Filters::Standard(3pm)

NAME
Mason::Filters::Standard - Standard filters DESCRIPTION
These filters are automatically composed into Mason::Component. FILTERS
Capture ($ref) Uses "$m->capture" to capture the content in $ref instead of outputting it. % $.Capture(my $content) {{ <!-- this will end up in $content --> % }} ... do something with $content CompCall ($path, @args...) Calls the component with path and @args, just as with "$m->scomp", with an additional coderef argument "yield" that can be invoked to generate the content. Arguments passed to "yield" can be accessed inside the content via @_. This is the replacement for Mason 1's Components With Content <http://search.cpan.org/perldoc?HTML::Mason::Devel#Component_Calls_with_Content>. In index.mc: % $.CompCall ('list_items.mi', items => @items) {{ <li><% $_[0] %></li> % }} In list_items.mi: <%class> has 'items'; has 'yield'; </%class> % foreach my $item (@{$.items}) { <% $.yield->($item) %> % } NoBlankLines Remove lines with only whitespace from content. This % $.NoBlankLines {{ hello world % }} yields hello world Repeat ($count) Repeat the content block $count times. Note that the block is re-executed each time, which may result in different content. <!-- Prints 1 to 5 --> % my $i = 1; % $.Repeat(5) {{ <% $i++ %><br> % }} Tee ($ref) Uses "$m->capture" to capture the content in $ref, and also output it. % $.Tee(my $content) {{ <!-- this will end up in $content and also be output --> % }} ... <!-- output content again down here --> <% $content %> Trim Remove whitespace from the beginning and end of the content. SEE ALSO
Mason::Manual::Filters, 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::Filters::Standard(3pm)
Man Page