# WithProjectDependencies

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

Configures 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`.

## Remarks

Expects a `cpanfile` in the resource's working directory (`appDirectory`).
If the cpanfile is in a different location, adjust `appDirectory` accordingly.
When using Carton with `cartonDeployment` set to `true`,
a `cpanfile.snapshot` must also be present.

## Definition

```go
func (PerlAppResource) WithProjectDependencies(options ...*WithProjectDependenciesOptions) PerlAppResource
```

## Parameters

- `options` (`...*WithProjectDependenciesOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithProjectDependenciesOptions` argument.

- `CartonDeployment` (`*bool`) -- If `true` and using Carton, adds `--deployment` for reproducible installs from `cpanfile.snapshot`. Ignored for other package managers.

## 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

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