Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddPerlScript

Method
📦 CommunityToolkit.Aspire.Hosting.Perl v13.6.1
func (DistributedApplicationBuilder) AddPerlScript(
resourceName string,
appDirectory string,
scriptName string,
) PerlAppResource

Signature

methodAddPerlScriptbuilder
Adds a Perl script resource (worker, CLI tool, background service) to the application model.
AddPerlScript(
resourceName string,
appDirectory string,
scriptName string,
) PerlAppResource
resourceNamestringThe name of the resource.
appDirectorystringThe path to the directory containing the Perl script. Resolved relative to the AppHost project directory; becomes the resource's working directory and the anchor for all relative path resolution (script path, WithLocalLib, cpanfile discovery).
scriptNamestringThe path to the script relative to appDirectory. Do not include the appDirectory prefix — the script is resolved relative to appDirectory automatically.
PerlAppResource

A reference to the IResourceBuilder.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder