The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


App::Scaffolder - Application for scaffolding using templates


version 0.002000


        use App::Scaffolder;


App::Scaffolder is the entry point for the application. It uses App::Cmd to provide the actual commands. See App::Scaffolder::Command for a command base class.


App-Scaffolder itself provides only a small framework for actual commands. In order to provide a new command, the following is necessary:

  • A command below the App::Scaffolder::Command namespace that extends App::Scaffolder::Command, for example something like App::Scaffolder::Command::mycommand.

  • Templates that are installed for File::ShareDir, in the directory that belongs to the distribution. Inside this directory, the following structure is required:

            <Command name>
            `-- <Template name>
                    `-- <Template files>


The templates (which are actually directory trees containing files and Template templates) are handled by App::Scaffolder::Template. The search path for the templates is usually constructed using File::HomeDir and File::ShareDir, so one may override existing templates or add new templates by putting them in the directory returned by


and appending the command name as subdirectory to it. So on Linux and the distribution App-Scaffolder-Mydist, which provides the command mycommand, this path would look something like the following:


In addition to this, the App::Scaffolder::Command base class also uses the SCAFFOLDER_TEMPLATE_PATH environment variable to add additional directories to the search path. Thus setting

        export SCAFFOLDER_TEMPLATE_PATH=~/scaffolder_templates

and putting a directory called mycommand below ~/scaffolder_templates which contains templates would also make them available to scaffolder mycommand. This could be useful to share templates with other users if the templates are stored in a location that is accessible to the other users, too.

The App::Scaffolder::Command command base class also provides two parameters related to the template search path:


Show the search path and list the templates found there.


Create the template directory in the my_dist_data directory returned by File::HomeDir and print the search path.


Manfred Stock <>


This software is copyright (c) 2014 by Manfred Stock.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.