Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update --man code example in pod.rakudoc #4542

Merged
merged 1 commit into from
Dec 26, 2024
Merged

Update --man code example in pod.rakudoc #4542

merged 1 commit into from
Dec 26, 2024

Conversation

1-1sam
Copy link
Contributor

@1-1sam 1-1sam commented Dec 13, 2024

The problem

The --man code example provided in the Rendering Pod to Text section has some issues:

  • It will only render Pod in the file being executed by Raku. This is
    problematic if you intend to distribute the program via Zef, as $*PROGRAM will
    not point to the original script but a wrapper without the Pod instead.
  • Performance issues from invoking Raku.

Solution provided

  • Print the output of pod2text $=pod using Pod::To::Text directly. This way
    we do not have to rely on $*PROGRAM pointing to our script file. It's also
    faster than re-invoking Raku.

@coke coke self-assigned this Dec 26, 2024
@coke
Copy link
Collaborator

coke commented Dec 26, 2024

Thanks for the submission will review shortly

Copy link
Collaborator

@coke coke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Testing, I see we want to add a ! to the $man parameter

@coke coke merged commit 328d770 into Raku:main Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants