Perl6::Perldoc - Use Perl 6 documentation in a Perl 5 program
This document describes Perl6::Perldoc version 0.0.5
use Perl6::Perldoc; =comment Now you can use Perl 6 style documentation =for DATA Including Perl 6 style DATA sections print <DATA>; =for DATA Of which there can be more than one
This module preprocesses your code from the point at which the module is first used, stripping out any Perl 6 documentation (as specified in Synopsis 26).
This means that, so long as your program starts with:
you can document it using the new Pod mark-up notation and it will still run correctly under the Perl 5 interpreter.
In addition, the module detects any
=DATA sections in the stripped documentation and makes them available to your program in three ways:
=DATAblock) in the
use the module and it takes care of everything.
Can't set up *DATA handle (%s)
The filter found at least one
=DATA block, but was unable to create a
*DATA filehandle in the caller's namespace (for the reason specified in the parens).
Perl6::Perldoc requires no configuration files or environment variables.
version module and the standard module
Unlike Perl 6 itself:
=DATAblocks. This is to avoid the unacceptably slow compilation speed that would result from attempting to fully parse the entire embedded Pod markup and then construct an internal representation of it.
=DATAblocks appear in the global variables
@DATA, and the global
*DATAfilehandle, rather than in a special
$?DATAobject. These variables and filehandle are accessible from
mainand in every other package that is explicitly declared in the file.
No bugs have been reported.
Please report any bugs or feature requests to
firstname.lastname@example.org, or through the web interface at http://rt.cpan.org.
The module itself had to be documented in Perl 5 POD
Copyright (c) 2007, Damian Conway
<DCONWAY@CPAN.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
This module will attempt to track any future changes to the Perl 6 specification. Hence its features and the Pod syntax it recognizes may change in future releases.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.