CPAN::Plugin::Specfile - Proof of concept implementation of a trivial CPAN::Plugin
# 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
Perl Programmers Reference Guide CPAN::Plugin::Specfile(3) NAME CPAN::Plugin::Specfile - Proof of concept implementation of a trivial CPAN::Plugin SYNOPSIS # 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 DESCRIPTION Implemented as a post-test hook, this plugin writes a specfile after every successful test run. The content is also written to the terminal. As a side effect, the timestamps of the written specfiles reflect the linear order of all dependencies. WARNING: This code is just a small demo how to use the plugin system of the CPAN shell, not a full fledged spec file writer. Do not expect new features in this plugin. OPTIONS The target directory to store the spec files in can be set using "dir" as in 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. AUTHOR Andreas Koenig <andk@cpan.org>, Branislav Zahradnik <barney@cpan.org> ATTRIBUTES See attributes(7) for descriptions of the following attributes: +---------------+-----------------------+ |ATTRIBUTE TYPE | ATTRIBUTE VALUE | +---------------+-----------------------+ |Availability | runtime/perl-532 | +---------------+-----------------------+ |Stability | Pass-through volatile | +---------------+-----------------------+ NOTES Source code for open source software components in Oracle Solaris can be found at https://www.oracle.com/downloads/opensource/solaris-source- code-downloads.html. This software was built from source available at https://github.com/oracle/solaris-userland. The original community source was downloaded from http://www.cpan.org/src/5.0/perl-5.32.0.tar.gz. Further information about this software can be found on the open source community website at https://www.perl.org/. perl v5.32.0 2020-06-14 CPAN::Plugin::Specfile(3)