Perl - Readme Drift

Open Beginner friendly
#2,375 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@Omnideth is already working on this.

Since Nov 4, 2026.

  • #2376 by @Omnideth — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
markdown
Domain
documentation

Research direction

Read src/CommunityToolkit.Aspire.Hosting.Perl/README.md alongside src/CommunityToolkit.Aspire.Hosting.Perl/PerlAppResourceBuilderExtensions.cs and its PackageManager partial. Start by checking the four AddPerl* entry points, their command behavior, path handling, and the run-mode dependency-file detection referenced in the issue. Update the README to describe those behaviors and verify each statement against the code; done when the README accurately documents all three points raised.

Written by the indexing model from the issue text.

Description

Page URL

https://github.com/CommunityToolkit/Aspire/blob/main/src/CommunityToolkit.Aspire.Hosting.Perl/PerlAppResourceBuilderExtensions.cs

Describe the issue

Describe the bug

README.md disagrees with the code:

  1. Entry points. "Core Concepts" (README.md#L40)
    says the integration provides two entry points (AddPerlScript, AddPerlApi). There are four:
    AddPerlModule and AddPerlExecutable are missing.

  2. Script path base. The "Key insight" callout
    (README.md#L98) says:

    The script path in AddPerlScript / AddPerlApi is relative to AppHost.cs

    The XML docs and the implementation resolve the script path relative to appDirectory: it's
    passed as a bare argument and the working directory is appDirectory. In the README's own
    "../scripts" example the script path is "Worker.pl", which only works relative to appDirectory.

  3. Implicit WithProjectDependencies(). The Package Management table and callout
    (README.md#L137,
    #L141-L143) already say that calling
    WithProjectDependencies() switches the default cpan to cpanm. They don't say that in run mode every
    AddPerl* method calls WithProjectDependencies() itself when appDirectory contains cpanfile,
    Makefile.PL, or Build.PL
    (PerlAppResourceBuilderExtensions.cs#L254-L259,
    HasDependencyFiles).
    A resource with no package-manager calls then gets a cpanm installer and a cpanm required-command
    check
    (PerlAppResourceBuilderExtensions.PackageManager.cs#L275-L280,
    #L34).
    Users are surprised when cpanm is reported missing.

    Related, out of scope here: detection runs inside AddPerl*, so a later .WithCarton() replaces the
    package manager but leaves the cpanm check in place. If that behavior should change, file it as a
    separate code issue. This issue only documents current behavior.

Suggestion

The README lists all four Add* methods and the command each one runs:

Method Runs
AddPerlScript perl -s <script>
AddPerlApi perl <script> daemon
AddPerlModule perl -M<Module> -e "<Module>->run()" (the module must provide run and be on @INC; the integration adds only WithLocalLib paths to PERL5LIB)
AddPerlExecutable <executable> directly

The "Key insight" callout says the script path, WithLocalLib, cpanfile discovery, and the working
directory are all relative to appDirectory, which is itself relative to the AppHost project
directory.

The Package Management section documents the auto-detection: which files trigger it, that it runs only
in run mode (publish behavior is issue 09), and that it switches the default cpan to cpanm.
Add this to the existing callout at L141-L143 rather than as a new paragraph after it (see below).
The fix inserts it between L142 and L143. git merge-tree against each branch below reports a clean merge.

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item

Dominant language
C#
Stars
632
Forks
204
Avg merge
2d 12h
Merged PRs (30d)
79

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CommunityToolkit/Aspire

All issues in CommunityToolkit/Aspire

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.