Zahatski Aliaksandr > Perl6-Pod > Perl6::Pod::FormattingCode::A

Download:
Perl6-Pod-0.60.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source  

NAME ^

Perl6::Pod::FormattingCode::A - Replaced by contents of specified macro/object

SYNOPSIS ^

    =alias PROGNAME    Earl Irradiatem Eventually
    =alias VENDOR      4D Kingdoms
    =alias TERMS_URL   L<http://www.4dk.com/eie>
    
    The use of A<PROGNAME> is subject to the terms and conditions
    laid out by A<VENDOR>, as specified at A<TERMS_URL>.

DESCRIPTION ^

A variation on placement codes is the A<> code, which is replaced by the contents of the named alias or object specified within its delimiters. For example:

    =alias PROGNAME    Earl Irradiatem Eventually
    =alias VENDOR      4D Kingdoms
    =alias TERMS_URL   L<http://www.4dk.com/eie>

    The use of A<PROGNAME> is subject to the terms and conditions
    laid out by A<VENDOR>, as specified at A<TERMS_URL>.

Any compile-time Perl 6 object that starts with a sigil is automatically available within an alias placement as well. Unless the object is already a string type, it is converted to a string during document-generation by implicitly calling .perl on it.

So, for example, a document can refer to its own filename (as A<$?FILE>), or to the subroutine inside which the specific Pod is nested (as A<$?ROUTINE>), or to the current class (as A<$?CLASS>). Similarly, the value of any program constants defined with sigils can be easily reproduced in documentation:

    # Actual code...
    constant $GROWTH_RATE of Num where 0..* = 1.6;

    =pod
    =head4 Standard Growth Rate

    The standard growth rate is assumed to be A<$GROWTH_RATE>.

Non-mutating method calls on these objects are also allowed, so a document can reproduce the surrounding subroutine's signature (A<$?ROUTINE.signature>) or the type of a constant (A<$GROWTH_RATE.WHAT>).

SEE ALSO ^

http://zag.ru/perl6-pod/S26.html, Perldoc Pod to HTML converter: http://zag.ru/perl6-pod/, Perl6::Pod::Lib

AUTHOR ^

Zahatski Aliaksandr, <zag@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2009-2010 by Zahatski Aliaksandr

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: