rf-web/vendor/bundle/gems/rouge-3.12.0/lib/rouge/demos/mason

23 lines
572 B
Plaintext
Raw Normal View History

2019-10-21 08:18:17 +00:00
<%doc>
This is a mason component.
# This is a comment.
</%doc>
<%args>
$color # this argument is required!
$size => 20 # default size
$country => undef # this argument is optional, default value is 'undef'
@items => (1, 2, 'something else')
%pairs => (name => "John", age => 29)
</%args>
% # A random block of Perl code
<%perl>
my @people = ('mary' 'john' 'pete' 'david');
</%perl>
% # Note how each line of code begins with the mandatory %
% foreach my $person (@people) {
Name: <% $person %>
% }