Yanick Champoux > XML-XSS-0.3.4 > XML::XSS::Role::Renderer

Download:
XML-XSS-0.3.4.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: v0.3.4   Source  

NAME ^

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

VERSION ^

version 0.3.4

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) 2013 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.

syntax highlighting: