
XML::XSS::Role::Renderer - XML::XSS role for rendering rule

version 0.1.3

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>',
} );

Yanick Champoux <yanick@cpan.org>

This software is copyright (c) 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.