# PerlAppResource

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

## Definition

```go
type PerlAppResource interface {
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- `IComputeResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- `ResourceWithWaitSupport`

## Methods

- [WithCarton](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource/withcarton.md) -- `method` -- 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` to run `carton install` at startup.
  ```go
  WithCarton() PerlAppResource
  ```
- [WithCpanMinus](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource/withcpanminus.md) -- `method` -- Configures the Perl application to use cpanm (App::cpanminus) as its package manager instead of the default cpan. Call this before `WithPackage` to change how packages are installed.
  ```go
  WithCpanMinus() PerlAppResource
  ```
- [WithLocalLib](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource/withlocallib.md) -- `method` -- Configures the Perl application to use a local::lib directory for module isolation. Sets `PERL5LIB`, `PERL_LOCAL_LIB_ROOT`, `PERL_MM_OPT`, and `PERL_MB_OPT` environment variables so that modules are resolved from and installed into the local directory.
  ```go
  WithLocalLib(options ...*WithLocalLibOptions) PerlAppResource
  ```
- [WithPackage](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource/withpackage.md) -- `method` -- Adds a Perl package (module) to be installed before the application starts. Uses the configured package manager: cpan by default, or cpanm if `WithCpanMinus` was called.
  ```go
  WithPackage(packageName string, options ...*WithPackageOptions) PerlAppResource
  ```
- [WithPerlbrew](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource/withperlbrew.md) -- `method` -- Configures the Perl application to use a specific perlbrew-managed Perl version.
  ```go
  WithPerlbrew(version string, options ...*WithPerlbrewOptions) PerlAppResource
  ```
- [WithPerlbrewEnvironment](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource/withperlbrewenvironment.md) -- `method` -- 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.
  ```go
  WithPerlbrewEnvironment(version string, options ...*WithPerlbrewEnvironmentOptions) PerlAppResource
  ```
- [WithPerlCertificateTrust](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource/withperlcertificatetrust.md) -- `method` -- Configures certificate trust for the Perl application by setting SSL/TLS environment variables that common Perl HTTP libraries respect. Sets `SSL_CERT_FILE` (IO::Socket::SSL / LWP), `PERL_LWP_SSL_CA_FILE` (LWP::UserAgent), and `MOJO_CA_FILE` (Mojolicious) to the certificate bundle path provided by Aspire.
  ```go
  WithPerlCertificateTrust() PerlAppResource
  ```
- [WithProjectDependencies](/reference/api/go/communitytoolkit.aspire.hosting.perl/perlappresource/withprojectdependencies.md) -- `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`.
  ```go
  WithProjectDependencies(options ...*WithProjectDependenciesOptions) PerlAppResource
  ```
