# withPerlbrewEnvironment

- 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 a specific perlbrew-managed Perl version. This resolves the Perl executable from the perlbrew installation and updates the resource's command and environment variables so that all subsequent operations use the specified Perl version.

## Definition

```typescript
interface PerlAppResource {
  // ... omitted for brevity
  withPerlbrewEnvironment(
    version: string,
    perlbrewRoot?: string): PerlAppResource
}
```

## Parameters

- `version` (`string`)
- `perlbrewRoot` (`string`) `optional`

## Returns

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

## Applies to

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