NAME
XML::XSS::Role::Renderer - XML::XSS role for rendering rule
VERSION
version 0.3.5
OVERLOADING
Concatenation (.)
Shortcut to get the style attributes.
my $pre = $xss.'chapter'.'pre';
is equivalent to
my $pre = $xss->get('chapter')->pre;
In addition of the usual style attributes, the special keyword 'style' can also be used, which returns the object itself. Which is useful to use the other overloaded operators, which don't work without it. :-(
# will work
$xss.'chapter'.'style' %= {
pre => '<div class="chapter">',
post => '</div>',
};
# will work too
my $chapter = $xss.'chapter';
$chapter %= {
pre => '<div class="chapter">',
post => '</div>',
};
# won't work!
$xss.'chapter' %= {
pre => '<div class="chapter">',
post => '</div>',
};
%=
Assigns a set of style attributes.
$xss.'chapter'.'style' %= {
pre => '<div class="chapter">',
post => '</div>',
};
is equivalent to
$xss->set( chapter => {
pre => '<div class="chapter">',
post => '</div>',
} );
AUTHOR
Yanick Champoux <yanick@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017, 2013, 2011, 2010 by Yanick Champoux.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.