Load
NAME
Pod::Load - Loads and compiles the Pod documentation from a string, file or filehandle.
SYNOPSIS
use Pod::Load;
# Read a file handle.
my $pod = load("file-with.pod6".IO);
say $pod.perl; # Process it as a Pod
# Or use simply the file name (it should exist)
my @pod = load("file-with.pod6");
say .perl for @pod;
my $string-with-pod = q:to/EOH/;
This ordinary paragraph introduces a code block:
EOH
say load( $string-with-pod ).perl;
DESCRIPTION
Pod::Load
is a module with a simple task (and interface):
obtaining the documentation tree of an external file in a standard,
straighworward way. Its mechanism (using EVAL) is inspired by
Pod::To::BigPage,
although it will use precompilation in case of files.
CAVEATS
The pod is obtained from the file or string via EVAL. That means that
it's going to run what is actually there. If you don't want that to
happen, strip all runnable code from the string (or file) before
submitting it to load
.
AUTHOR
JJ Merelo <[email protected]>
COPYRIGHT AND LICENSE
Copyright 2018,2019,2020 JJ Merelo
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
$string
;\n\n=output@chunks[1]")); } else { @pod = (EVAL ("module $module-name \{\n" ~ $copy ~ "\n\}\n\$=pod")); } return @pod; }
') }