# AddPerlExecutable

- Module: [CommunityToolkit.Aspire.Hosting.Perl](/reference/api/go/communitytoolkit.aspire.hosting.perl.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Adds a Perl executable (compiled binary or PAR-packed application) to the application model. The executable is run directly rather than through the `perl` interpreter.

## Definition

```go
func (DistributedApplicationBuilder) AddPerlExecutable(
    resourceName string,
    appDirectory string,
    executablePath string,
) PerlAppResource
```

## Parameters

- `resourceName` (`string`) -- The name of the resource.
- `appDirectory` (`string`) -- The path to the working directory for the application.
- `executablePath` (`string`) -- The path to the executable, relative to `appDirectory`.

## Returns

[`PerlAppResource`](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource.md) -- A reference to the `IResourceBuilder`.

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

## Applies to

- `DistributedApplicationBuilder`
