Module...emplate(3pm)

๐Ÿ’– Module::Starter::Plugin::Template ๐Ÿ’–

okay bestie, so this is a page from the User Contributed Perl Documentation for Module::Starter::Plugin::Template โ€” yes, the header literally says Module...emplate(3pm) because manpage headers truncate like that, it's giving budget cuts ๐Ÿ˜ญ โ€” and we're gonna walk through it together, no gatekeeping.


โœจ NAME โœจ

Module::Starter::Plugin::Template โ€” it's module starter, but make it templates ๐Ÿ’…


๐ŸŒธ VERSION ๐ŸŒธ

version 1.80 โœจ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

okay so here's the vibe, copy-paste girlies:

use Module::Starter qw(
  Module::Starter::Simple
  Module::Starter::Plugin::Template
);

Module::Starter->create_distro(%args);

that's it. that's the whole ritual ๐Ÿ•ฏ๏ธ


๐ŸŽ€ DESCRIPTION ๐ŸŽ€

so this plugin is designed to be added onto a Module::Starter::Simple-compatible Module::Starter class. like, it's the accessory that completes the fit ๐Ÿ‘œ

what it does: it adds stub methods for template retrieval and template rendering. and then โ€” and this is the main character move โ€” it replaces all of Simple's _guts methods with methods that will retrieve and render the appropriate templates. glow up, honestly. no cap. ๐Ÿ”ฅ


๐Ÿ‘‘ CLASS METHODS ๐Ÿ‘‘

๐ŸŒˆ new(%args)

this plugin calls the new supermethod and then initializes the template store and the renderer. (see "templates" and "renderer" below, they're right there, bestie, keep reading ๐Ÿ“–)


๐Ÿ’œ OBJECT METHODS ๐Ÿ’œ

๐Ÿ“ templates()

this method is used to initialize the template store on the Module::Starter object. it returns a hash of templates โ€” each key is a filename, and each value is the body of that template. and the filename Module.pm is used for the module template. so cute, so organized. ๐Ÿ—‚๏ธ

๐Ÿงš renderer()

this method is used to initialize the template renderer. its result gets stored in the object's renderer entry. and then... the implementation will determine its use. mysterious. cryptic. iconic. ๐Ÿ”ฎ

โญ render($template, \%options)

the render method will render the template that's passed to it, using the data in the Module::Starter object and in the hash of passed parameters. two data sources, one render, we love a collab ๐Ÿค

๐Ÿ’€ _guts methods

okay so all of the FILE_guts methods from Module::Starter::Simple are subclassed to look something like this:

sub file_guts {
    my $self = shift;
    my %options;
    @options{qw(first second third)} = @_;

    my $template = $self->{templates}{filename};
    $self->render($template, \%options);
}
โš ๏ธ real talk: these methods will need to be rewritten when (as is likely) Module::Starter::Simple's _guts methods are refactored into a registry. so don't get too attached, babe. it's a situationship with the API ๐Ÿ˜ญ

and here's the full roster of _guts methods, roll call ๐Ÿ“ฃ:

  • module_guts
  • Makefile_PL_guts
  • MI_Makefile_PL_guts
  • Build_PL_guts
  • Changes_guts
  • README_guts
  • t_guts
  • MANIFEST_guts
  • ignores_guts

๐Ÿ’– AUTHOR ๐Ÿ’–

Ricardo SIGNES, "<rjbs at cpan.org>" ๐Ÿซถ


๐Ÿ”ฅ Bugs ๐Ÿ”ฅ

please report any bugs or feature requests to the bugtracker for this project on GitHub at: https://github.com/xsawyerx/module-starter/issues. i will be notified, and then you'll automatically be notified of progress on your bug as i make changes. mutuals keeping each other updated, that's the whole system fr fr ๐Ÿ“ฌ


Copyright 2005-2007 Ricardo SIGNES, All Rights Reserved.

this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay, legally speaking โš–๏ธโœจ


and that's the whole page, bestie!! this was documented with perl v5.40.1, dated 2026-01-23, and the manpage itself is Module...emplate(3pm) ๐Ÿ’… mwah, go build something cute ๐ŸŽ€๐Ÿฆ‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from