Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithPackage

Method
📦 CommunityToolkit.Aspire.Hosting.Perl v13.6.1
func (PerlAppResource) WithPackage(
packageName string,
options ...*WithPackageOptions,
) PerlAppResource

Signature

methodWithPackagebuilder
Adds 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,
) PerlAppResource
packageNamestringThe name of the Perl module to install (e.g., "Mojolicious", "DBI").
options...*WithPackageOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithPackageOptions argument.

Force*boolIf true, force installation even if the module is already installed or tests fail.
SkipTest*boolIf true, skip running tests during installation.
PerlAppResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: