GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mason::Compilation(3) User Contributed Perl Documentation Mason::Compilation(3)

Mason::Compilation - Performs compilation of a single component

A new "Mason::Compilation" object is created by Mason::Interp to compile each component.

This class has no public API at this time.

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. By default it consults the class_header parameter.

    # Add to the top of every component class:
    #   use Modern::Perl;
    #   use JSON::XS qw(encode_json decode_json);
    #
    override 'output_class_header' => sub {
        return join( "\n",
            super(),
            'use Modern::Perl;',
            'use JSON::XS qw(encode_json decode_json);' );
    };
    
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.

Mason

Jonathan Swartz <swartz@pobox.com>

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.

2015-05-16 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.