CommunityToolkit.Aspire.Hosting.Perl
📦 CommunityToolkit.Aspire.Hosting.Perlv13.6.1Import path
apphost/modules/aspire12Functions
1Types
1 types, 12 functions and 0 members
Handles
Functions
DistributedApplicationBuilder
method
AddPerlApibuilderAdds a Perl API server resource (e.g., Mojolicious, Dancer2) to the application model. Passes the
daemon subcommand so HTTP frameworks start a listener.AddPerlApi(resourceName string, appDirectory string, scriptName string) PerlAppResourcemethod
AddPerlExecutablebuilderAdds a Perl executable (compiled binary or PAR-packed application) to the application model. The executable is run directly rather than through the
perl interpreter.AddPerlExecutable(resourceName string, appDirectory string, executablePath string) PerlAppResourcemethod
AddPerlModulebuilderAdds a Perl module to the application model. The module is executed using
perl -MModule::Name -e "Module::Name->run()" .AddPerlModule(resourceName string, appDirectory string, moduleName string) PerlAppResourcemethod
AddPerlScriptbuilderAdds a Perl script resource (worker, CLI tool, background service) to the application model.
AddPerlScript(resourceName string, appDirectory string, scriptName string) PerlAppResourcePerlAppResource
method
WithCartonbuilderConfigures the Perl application to use Carton as its package manager. Carton manages dependencies via
cpanfile and a lock file (cpanfile.snapshot ), enabling reproducible builds. Use WithProjectDependencies to run carton install at startup.WithCarton() PerlAppResourcemethod
WithCpanMinusbuilderConfigures the Perl application to use cpanm (App::cpanminus) as its package manager instead of the default cpan. Call this before
WithPackage to change how packages are installed.WithCpanMinus() PerlAppResourcemethod
WithLocalLibbuilderConfigures the Perl application to use a local::lib directory for module isolation. Sets
PERL5LIB , PERL_LOCAL_LIB_ROOT , PERL_MM_OPT , and PERL_MB_OPT environment variables so that modules are resolved from and installed into the local directory.WithLocalLib(options ...*WithLocalLibOptions) PerlAppResourcemethod
WithPackagebuilderAdds a Perl package (module) to be installed before the application starts. Uses the configured package manager: cpan by default, or cpanm if
WithCpanMinus was called.WithPackage(packageName string, options ...*WithPackageOptions) PerlAppResourcemethod
WithPerlbrewbuilderConfigures the Perl application to use a specific perlbrew-managed Perl version.
WithPerlbrew(version string, options ...*WithPerlbrewOptions) PerlAppResourcemethod
WithPerlbrewEnvironmentbuilderConfigures the Perl application to use a specific perlbrew-managed Perl version. This resolves the Perl executable from the perlbrew installation and updates the resource's command and environment variables so that all subsequent operations use the specified Perl version.
WithPerlbrewEnvironment(version string, options ...*WithPerlbrewEnvironmentOptions) PerlAppResourcemethod
WithPerlCertificateTrustbuilderConfigures certificate trust for the Perl application by setting SSL/TLS environment variables that common Perl HTTP libraries respect. Sets
SSL_CERT_FILE (IO::Socket::SSL / LWP), PERL_LWP_SSL_CA_FILE (LWP::UserAgent), and MOJO_CA_FILE (Mojolicious) to the certificate bundle path provided by Aspire.WithPerlCertificateTrust() PerlAppResourcemethod
WithProjectDependenciesbuilderConfigures project-level dependency installation for the Perl application. Runs the appropriate install command based on the active package manager: - - If the active package manager is
cpan (the default), it is automatically switched to cpanm since cpan does not support --installdeps .WithProjectDependencies(options ...*WithProjectDependenciesOptions) PerlAppResource