Mason

 view release on metacpan or  search on metacpan

lib/Mason/Manual/Components.pod  view on Meta::CPAN

    sub multiply {
        my ($self, $a, $b) = @_;
        return $a * $b;
    }
    </%class>

=head2 Output versus return value

Most Mason methods output content such as HTML. The content is not actually
returned, but is instead appended to an implicit buffer. This is slightly more
complicated but is necessary for supporting streaming applications.

When Mason generates C<main> and other methods declared with C<< <%method> >>,
it puts an implicit

    return undef;

at the bottom of the method, so that unless you specify otherwise, there will
be no return value. This is important because of syntactical shortcuts like

    <% inner() %>



( run in 0.242 second using v1.01-cache-2.11-cpan-4d50c553e7e )