App::D...Pointer(3pm)
π NAME π
App::DocKnot::Spin::Pointer β bestie, it takes a lil pointer that points at some external file and turns it into HTML. That's the whole job. It's giving "glow up for your docs" energy β¨π¦
π SYNOPSIS π
use App::DocKnot::Spin::Pointer;
use App::DocKnot::Spin::Sitemap;
use Path::Tiny qw(path);
my $sitemap_path = path('/input/.sitemap');
my $sitemap = App::DocKnot::Spin::Sitemap->new($sitemap_path);
my $pointer = App::DocKnot::Spin::Pointer->new({
output => path('/output'),
sitemap => $sitemap,
});
my $input = path('/input/file.spin');
my $output = path('/output/file.html');
$pointer->spin_pointer($input, $output);
π§ REQUIREMENTS π§
You need Perl 5.24 or later, plus these modules and they're all available from CPAN so no stress: File::ShareDir, Kwalify, List::SomeUtils, Path::Tiny, Pod::Thread, and YAML::XS. slay π
πΈ DESCRIPTION πΈ
So the tree of input files for App::DocKnot::Spin can have pointers to external files in β¨various formatsβ¨. Those files live in YAML format and their names end in .spin (iykyk). This module takes those files, processes them, and converts them into HTML β and, if you set it up that way, it also adds the links so the page is all integrated with the rest of the site. obsessed. π«Ά
For the juicy details of the pointer file format, go look at POINTER FILES below. π
π CLASS METHODS π
new(ARGS)
Makes a brand new App::DocKnot::Spin::Pointer object. π And here's the tea: one single converter object can be used over and over again to convert pointers across a whole tree of files. Efficiency queen.
ARGS should be a hash reference with one or more of these keys β and bestie, they're all optional:
outputβ the path to the root of the output tree when you're converting a tree of files. It gets used to calculate relative path names so it can generate inter-page links with thesitemapargument you provide. β οΈ Ifsitemapis given, this one should always be given too.sitemapβ anApp::DocKnot::Spin::Sitemapobject. It's what creates the inter-page links. For those inter-page links, theoutputargument must also be provided.style-urlβ the base URL for the style sheets. π A style sheet specified in a pointer file is treated as relative to this URL, and this URL gets prepended to it. If you don't give this option, the name of the style sheet is used verbatim as its URL, except with.cssappended. no cap.threadβ anApp::DocKnot::Spin::Threadobject, used for converting POD into HTML. It should be configured with the sameApp::DocKnot::Spin::Sitemapobject as thesitemapargument. keep them matching bestie π
π INSTANCE METHODS π
is_out_of_date(POINTER, OUTPUT)β returns true ifOUTPUTis missing, or if it was modified less recently than the modification time of eitherPOINTERor the underlying file that it points to. π Both paths must bePath::Tinyobjects.spin_pointer(POINTER, OUTPUT)β converts a single pointer file to HTML.POINTERis the path to the pointer file, andOUTPUTis the path to where you want the output written. Both paths must bePath::Tinyobjects. π¦π
π POINTER FILES π
A pointer file is a YAML file whose name ends in .spin. It points to the source file for a generated HTML page and hands over extra config for converting it. The valid keys for a pointer file are:
format
The format of the source file. The supported values are markdown, pod, and text. Required. π¨
path
The path to the source file. It may be relative β and if it is, it's relative to the pointer file. Required. π¨
options
Extra options that control the conversion to HTML. These are gonna be different for each supported format.
markdown has no supported options. π
The supported options for a format of pod are:
contents
Boolean saying whether to generate a table of contents. The default is false.
navbar
Boolean saying whether to generate a navigation bar at the top of the page. The default is true. β¨
The supported options for a format of text are:
modified
Boolean saying whether to add a last modified header. It'll always be done if the file contains a CVS-style $Id$ string, but otherwise it only happens if this option is set to true. The default is false.
style
The style sheet to use for the converted output. Optional. If it's not set: converted markdown output will be unstyled, converted pod output will use a style sheet named pod, and converted text output will use a style sheet named faq. cute defaults honestly π
title
The title of the converted page. Optional. If it's not set, the title gets taken from the converted file in a format-specific way:
- For Markdown, the title is the contents of the first top-level heading. π
- For POD, the title is taken from a NAME section formatted according to the conventions for manual pages.
π AUTHOR π
Russ Allbery <rra@cpan.org> π
π COPYRIGHT AND LICENSE π
Copyright 2021, 2024 Russ Allbery <rra@cpan.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
π¦ SEE ALSO π¦
docknot(1)App::DocKnot::SpinApp::DocKnot::Spin::Sitemap
This module is part of the App-DocKnot distribution. The current version of DocKnot is available from CPAN, or directly from its web site at https://www.eyrie.org/~eagle/software/docknot/ πβ¨
ok that's the whole page bestie, you ate that π
perl v5.40.1 Β· 2026-01-16 Β· App::D...Pointer(3pm) β mwah, go convert some pointers, ily π«Άπ
π¦ where this page comes from
- ubuntu resolute: docknot 8.0.1-1build1 Β· MIT
- ubuntu stonking: docknot 8.0.1-1build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms