Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Mason/Filters/Standard.pm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Remove lines with only whitespace from content. This
hello


world
world
% }}

yields
Expand Down
2 changes: 1 addition & 1 deletion lib/Mason/Interp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ Extension to add to the end of object files. Default is ".mobj".
A list of plugins and/or plugin bundles:

plugins => [
'OnePlugin',
'OnePlugin',
'AnotherPlugin',
'+My::Mason::Plugin::AThirdPlugin',
'@APluginBundle',
Expand Down
8 changes: 4 additions & 4 deletions lib/Mason/Manual/Components.pod
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Use Moose 'has' syntax to declare attributes within a C<< <%class> >> section:
</%class>

=head2 Attributes are read-write by default

L<Mason::Component::Moose> imports
L<MooseX::HasDefaults::RW|MooseX::HasDefaults> into all components, which makes
attributes read-write unless stated otherwise. This is not considered best
Expand Down Expand Up @@ -345,7 +345,7 @@ C<TidyObjectFiles>:
4 *_m_buffer = \$Mason::Request::current_buffer;
5 sub _inner { inner() }
6 my $_class_cmeta;
7
7
8 method _set_class_cmeta ($interp) {
9 $_class_cmeta = $interp->component_class_meta_class->new(
10 'class' => CLASS,
Expand All @@ -358,7 +358,7 @@ C<TidyObjectFiles>:
17 );
18 }
19 sub _class_cmeta { $_class_cmeta }
20
20
21 method main {
22 #line 1 "/home/myapp/comps/hi.mc"
23 $$_m_buffer .= 'Hi there! The time is ';
Expand All @@ -367,7 +367,7 @@ C<TidyObjectFiles>:
26 #line 1 "/home/myapp/comps/hi.mc"
27 $$_m_buffer .= '.
28 ';
29
29
30 return;
31 }

Expand Down
8 changes: 4 additions & 4 deletions lib/Mason/Manual/Cookbook.pod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Mason::Manual::Cookbook - Recipes for common Mason tasks

=head2 HTML list formed from array

<ul>
% foreach $item (@list) {
<li><% $item %></li>
% }
<ul>
% foreach $item (@list) {
<li><% $item %></li>
% }
</ul>

=head2 HTML table formed from list of objects
Expand Down
10 changes: 5 additions & 5 deletions lib/Mason/Manual/Filters.pod
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,22 @@ Here's a filter package that implements two filters, C<Upper> and C<Lower>:

package MyApp::Filters;
use Mason::PluginRole;

method Upper () {
return sub { uc($_[0]) }
}

method Lower () {
return sub { lc($_[0]) }
}

1;

To use these in a component:

<%class>
with 'MyApp::Filters';
</%class>
</%class>

% $.Upper {{
...
Expand Down Expand Up @@ -251,7 +251,7 @@ L<Mason::Filters::Standard|Mason::Filters::Standard> for their implementations.

=head2 <%filter> block

You can use the C<< <%filter> >> block to define filters that output content.
You can use the C<< <%filter> >> block to define filters that output content.
It works just like a C<< <%method> >> block, except that you can call C<<
$yield->() >> to generate the original content. e.g.

Expand Down
24 changes: 12 additions & 12 deletions lib/Mason/Manual/Plugins.pod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Pass a list of plugin specs to the Mason constructor:

Mason->new(plugins =>
[
'OnePlugin',
'OnePlugin',
'AnotherPlugin',
'+My::Mason::Plugin::AThirdPlugin',
'@APluginBundle',
Expand Down Expand Up @@ -157,7 +157,7 @@ looks like this:
package Mason::PluginBundle::MyBundle
use Moose;
with 'Mason::PluginBundle';

sub requires_plugins {
return (
'A',
Expand All @@ -167,29 +167,29 @@ looks like this:
'+My::PluginBundle::E',
);
}

1;

__END__

=pod

=head1 NAME

Mason::PluginBundle::MyBundle - My plugin bundle

=head1 INCLUDED PLUGINS

=over

=item A
=item B
=item +My::Plugin::C
=item @D
=item +My::PluginBundle::E

=back

....

The C<requires_plugins> method returns a list of entries, with the same syntax
Expand Down
4 changes: 2 additions & 2 deletions lib/Mason/t/Filters.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ method Upper () { sub { uc(shift) } }
Hello World.
% }} # end Upper

% sub { ucfirst(shift) } {{
% sub { ucfirst(shift) } {{
<% "hello world?" %>
% }}
% }}

% sub { tr/A-Z/a-z/; $_ } {{
Hello World!
Expand Down