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