Module...r::PBP(3pm)
πΈ NAME πΈ
Module::Starter::PBP β bestie, this is the plugin that creates a whole new Perl module exactly the way the book Perl Best Practices says you should. No cap. It's giving "scaffolding, but make it classy" π
(oh and the manual name for this page is Module...r::PBP(3pm) β it lives in the User Contributed Perl Documentation section, iykyk π«Ά)
π VERSION π
This document describes Module::Starter::PBP version 0.003. Yeah she's an elder but she ATE π
β¨ SYNOPSIS β¨
Okay so first, in your ~/.module-starter/config file:
# In your ~/.module-starter/config file...
author: <Your Name>
email: <your@email.addr>
plugins: Module::Starter::PBP
template_dir: </some/absolute/path/name>
Then, from the command-line:
# Then on the command-line...
> module-starter --module=Your::New::Module
Or, if you're feeling lazy and you're fully happy to just vibe with the recommendations from Perl Best Practices:
# Or, if you're lazy and happy to go with
# the recommendations in "Perl Best Practices"...
> perl -MModule::Starter::PBP=setup
π¦ DESCRIPTION π¦
This module implements a simple approach to creating modules and all their support files, and it's built on the Module::Starter approach. Heads up tho: Module::Starter has to be installed before this module can be used, no skipping that step bestie π
When you use it as a Module::Starter plugin, this module lets you point at a simple little directory of templates. Those templates get filled in with info that's specific to your module, and then they become the whole basis of your shiny new module. Literally the blueprint era of module creation π§
And the default templates it hands you right out of the box? Based on the recommendations in the book Perl Best Practices. Iconic behavior, honestly π
π INTERFACE π
This module just acts as a plugin for Module::Starter. So it uses the exact same command-line interface as that module. Nothing extra, nothing weird.
Which template files it's supposed to use gets specified in your Module::Starter config file β you just add a template_dir configuration variable that gives the full path name of the directory where you want to keep your templates. That's it, that's the assignment π
The easiest way to set up this config file, the associated directory, and the necessary template files is literally just to type:
> perl -MModule::Starter::PBP=setup
on the command line. Then it's gonna ask you for your name, your email address, and the full path name of the directory where you want to keep the templates β and after all that, the templates get created and installed. Slay β¨
After that you can make a new module by typing:
> module-starter --module=Your::New::Module
πΈ Template format πΈ
The templates are plain files, named:
Build.PL
Makefile.PL
README
Changes
Module.pm
t/whatever_you_like.t
So here's the tea: the Module.pm file is the template for the .pm file of your module. Anything you drop into the t/ subdirectory becomes a template for your module's testing files. And all the remaining files are templates for the distribution files that share the same names. Matching set, periodt π
Inside those files, these placeholders get replaced with the appropriate info specific to the file:
<AUTHOR>β the nominated author. Pulled straight from theauthorsetting in yourModule::Starterconfigfile. π<BUILD INSTRUCTIONS>β the Makefile or Module::Build instructions. Computed automatically according to thebuildersetting in yourModule::Starterconfigfile.<DATE>β the current date (as returned bylocaltime). Computed automagically β¨<DISTRO>β the name of the complete module distribution. Computed automatically from the name of the module.<EMAIL>β where to send feedback. Taken from theemailsetting in yourModule::Starterconfigfile. π§<LICENSE>β the licence under which the module is released. Taken from thelicensesetting in yourModule::Starterconfigfile.<MAIN MODULE>β the name of the main module of the distribution.<MAIN PM FILE>β the name of the.pmfile for the main module.<MODULE NAME>β the name of the current module being created within the distribution.<RT NAME>β the name to use for bug reports to the RT system. That is:
Please report any bugs or feature requests to
bug-<RT NAME>@rt.cpan.org
<YEAR>β the current year. Computed automatically.
π DIAGNOSTICS π
These are the "bestie something went wrong" messages. Read them, they're actually telling you what's up.
Can't find directory that holds Module::Starter::PBP templatesβ you didn't tellModule::Starter::PBPwhere your templates are stored. You need a'template_dir'specification. Typically this would go in your~/.module-starter/configfile. Something like:
template_dir: /users/you/.module-starter/Templates
Can't access Module::Starter::PBP template directoryβ you did specify a'template_dir', but that path didn't lead to a readable directory. πThe template: %s isn't in the template directory (%s)β one of the required templates was missing from the template directory you specified. πThe template: %s isn't readable in the template directory (%s)β one of the templates in the template directory you specified was not readable.Unknown placeholder <%s> in %sβ one of the templates in the template directory contained a replacement item that wasn't a known piece of information. Rude of it, honestly π€
π CONFIGURATION AND ENVIRONMENT π
Go see the documentation for Module::Starter and module-starter. They've got the details π«Ά
π DEPENDENCIES π
Requires the Module::Starter module. That's the whole list, she's low maintenance.
π¦ INCOMPATIBILITIES π¦
None reported. Clean β¨
β BUGS AND LIMITATIONS β
No bugs have been reported. Not a single one. Immaculate. π
Please report any bugs or feature requests to bug-module-starter-pbp@rt.cpan.org, or through the web interface at <http://rt.cpan.org>.
π AUTHOR π
Damian Conway "<DCONWAY@cpan.org>"
The one and only π
π LICENCE AND COPYRIGHT π
Copyright (c) 2005, Damian Conway "<DCONWAY@cpan.org>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π DISCLAIMER OF WARRANTY π
Bestie, this is the loud part and it matters. Read it. It is ALL CAPS for a reason. π₯
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
and that's the whole page, bestie π this was perl v5.40.1, dated 2026-06-12, and it's filed under Module...r::PBP(3pm) in the User Contributed Perl Documentation. stay fruity, go make a module π§β¨
π¦ where this page comes from
- ubuntu stonking: libmodule-starter-pbp-perl 0.003-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms