CPAN::P...pecfile(3pm)
π NAME
Okay so bestie, welcome to CPAN::Plugin::Specfile β it's a proof of concept implementation of a trivial CPAN::Plugin. That's the whole vibe. Lowkey a tiny little demo plugin, highkey adorable. This page lives in the Perl Programmers Reference Guide (the header up top is literally CPAN::P...pecfile(3pm), yes the terminal clipped it, she's mysterious like that π).
β¨ SYNOPSIS β¨
Here's the whole group chat of commands, fr fr:
# once in the cpan shell
o conf plugin_list push CPAN::Plugin::Specfile
# make permanent
o conf commit
# any time in the cpan shell to write a spec file
test Acme::Meta
# disable
# if it is the last in plugin_list:
o conf plugin_list pop
# otherwise, determine the index to splice:
o conf plugin_list
# and then use splice, e.g. to splice position 3:
o conf plugin_list splice 3 1
Read it like a little ritual: push the plugin in, o conf commit to make it permanent, then any time you run test Acme::Meta in the cpan shell it writes a spec file for you π. To disable it β if it's the last thing in plugin_list you just o conf plugin_list pop her out. If she's not last? Run o conf plugin_list to figure out the index to splice, then use splice, e.g. to splice position 3: o conf plugin_list splice 3 1. Slay.
π DESCRIPTION π
So the way this works: it's implemented as a post-test hook, and this plugin writes a specfile after every successful test run. Not just to disk, bestie β the content is also written to the terminal. Double delivery, main character energy β¨.
As a side effect (a cute little bonus, no cap), the timestamps of the written specfiles reflect the linear order of all dependencies. It's giving "accidental timeline feature" and honestly we're obsessed π¦.
β οΈ WARNING: this code is just a small demo of how to use the plugin system of the CPAN shell. It is not a full fledged spec file writer. Do not expect new features in this plugin. Periodt. π
πΈ OPTIONS πΈ
The target directory to store the spec files in can be set using dir, like this:
o conf plugin_list push CPAN::Plugin::Specfile=dir,/tmp/specfiles-000042
The default directory for this is the plugins/CPAN::Plugin::Specfile directory in the cpan_home directory. If you don't say anything, that's where she goes π.
π«Ά AUTHOR π«Ά
- Andreas Koenig
<andk@cpan.org> - Branislav Zahradnik
<barney@cpan.org>
And that's the whole page, bestie!! π This lil icon was brought to you by perl v5.42.3, dated 2026-11-03 β iykyk πΈπ¦β¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms