# withCarton

- Module: [CommunityToolkit.Aspire.Hosting.Perl](/reference/api/typescript/communitytoolkit.aspire.hosting.perl.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)

Configures the Perl application to use Carton as its package manager. Carton manages dependencies via `cpanfile` and a lock file (`cpanfile.snapshot`), enabling reproducible builds. Use `WithProjectDependencies``1` to run `carton install` at startup.

## Definition

```typescript
interface PerlAppResource {
  // ... omitted for brevity
  withCarton(): PerlAppResource
}
```

## Returns

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

## Applies to

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