# PerlAppResource.WithProjectDependencies

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

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
type PerlAppResource interface {
    // ... omitted for brevity
    WithProjectDependencies(options ...*WithProjectDependenciesOptions) PerlAppResource
}
```

## Signature

```go
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()`.

## Defined on

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