Module...:Smart(3pm)
π Module::Starter::Smart β the Module...:Smart(3pm) page, bestie edition π
okay so real talk: this is a page from the User Contributed Perl Documentation, and it's about a little plugin called Module::Starter::Smart. It's giving "I make Module::Starter play nice with distros that already exist" energy. Let's get into it. π¦
β¨ NAME β¨
Module::Starter::Smart β a Module::Starter plugin for adding new modules into an existing distribution. that's it, that's the whole vibe. π
πΈ VERSION πΈ
version 0.0.10
π SYNOPSIS π
use Module::Starter qw/Module::Starter::Smart/;
Module::Starter->create_distro(%args);
# or in ~/.module-starter/config
plugin: Module::Starter::Smart
# create a new distribution named 'Foo-Bar'
$ module-starter --module=Foo::Bar
# ... then add a new module
$ module-starter --module=Foo::Bar::Me --distro=Foo-Bar
π«Ά DESCRIPTION π«Ά
So Module::Starter::Smart is a simple helper plugin for Module::Starter. It subclasses Module::Starter::Simple and brings its own implementation for several file creation subroutines, like create_distro, create_modules, create_t, and so on. and so on is doing a lot of heavy lifting there but periodt. These new implementations were designed to work with existing distributions. π
When you invoke it, the plugin checks if the distribution is already created. If it is, the plugin would bypass create_basedir) and go ahead and pull in all the existing modules and test files; that info gets used later in the corresponding file creation subroutines so it can skip the files that already exist. no overwriting, no drama, we respect the existing files. β¨
UPDATE: This plugin only covers the simplest use cases. For advanced usage, check out Module::Starter::AddModule. (iykyk, go look at that one if you need the fancy stuff.)
π§ Example π§
Say you have an existing distro, Goof-Ball, and you want to add a new module, Goof::Troop. say less.
% ls -R Goof-Ball
Build.PL Changes MANIFEST README lib/ t/
Goof-Ball/lib:
Goof/
Goof-Ball/lib/Goof:
Ball.pm
Goof-Ball/t:
00.load.t perlcritic.t pod-coverage.t pod.t
Go to the directory containing your existing distribution and run module-starter, giving it the names of the existing distribution and the new module: two names, one command, slay.
% module-starter --distro=Goof-Ball --module=Goof::Troop
Created starter directories and files
% ls -R Goof-Ball
Build.PL Changes MANIFEST README lib/ t/
Goof-Ball/lib:
Goof/
Goof-Ball/lib/Goof:
Ball.pm Troop.pm
Goof-Ball/t:
00.load.t perlcritic.t pod-coverage.t pod.t
And boom β Troop.pm has been added to Goof-Ball/lib/Goof. ate. π
π₯ INTERFACE π₯
No public methods. literally none, bestie. The module works by subclassing Module::Starter::Simple and rewiring its internal behaviors. main character energy: it doesn't have an API, it has a strategy. π
π DEPENDENCIES π
Module::Starter::Smart subclasses Module::Starter::Simple. that's the whole list. short and iconic. π
π INCOMPATIBILITIES π
The plugin works perfectly with other template plugins, i.e. Module::Starter::PBP (I started using it to develop this module). yes, you read that right β this is the section where the bad news is actually good news. π¦
π BUGS AND LIMITATIONS π
Please report any bugs or feature requests to bug-module-starter-smart@rt.cpan.org, or through the web interface at http://rt.cpan.org. fr fr, they want to hear about it. π
β ACKNOWLEDGEMENT β
Special thanks to the following contributors: the girlies and guys who made this happen, we see you. π«Ά
- David Messina
- David Steinbrunner
- Andrew Kirkpatrick
- Markus BΓΆhme
- Lisa Hare
- Gregor Herrmann
π AUTHOR π
Ruey-Cheng Chen "<rueycheng@cpan.com>"
π LICENCE AND COPYRIGHT π
Copyright (c) 2006, 2012, 2017, 2026 Ruey-Cheng Chen "<rueycheng@cpan.com>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. free as in freedom, not free as in "no rules". β¨
πΈ DISCLAIMER OF WARRANTY πΈ
okay bestie, deep breath, this is the serious part and we keep it exactly as serious as it needs to be:
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 one's built for perl v5.40.1 and dated 2026-01-31 β go add a module to your distro and think of me. π¦πβ¨
π¦ where this page comes from
- ubuntu resolute: libmodule-starter-smart-perl 0.0.10-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmodule-starter-smart-perl 0.0.10-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