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 perlunicook.pod fixing grammatical error #22944

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from

Conversation

jidanni
Copy link
Member

@jidanni jidanni commented Jan 28, 2025

We fix the grammatical error by adding a CJK example!

We fix the grammatical error by adding a CJK example!
@vaitkus
Copy link
Contributor

vaitkus commented Jan 28, 2025

Would it also make sense to add the use utf8; to the example just to make sure the embedded string is interpreted correctly? On my first copy/paste try without the explicit utf8 statement say produced an empty string.

Also, maybe this example could be further enhanced by adding a say statement to the $nv part as well, i.e. explicitly stating in a comment what the expected value should be. Right now, running:

use v5.14;  # needed for num() function

use strict;
use warnings;

use Unicode::UCD qw(num);

use charnames qw(:full);
my $nv = num("\N{RUMI DIGIT ONE}\N{RUMI DIGIT TWO}");
say "$nv";

with v5.34.0 on Ubuntu 22.04 raises an undef value warning at the say statement. However, changing the string to either only "\N{RUMI DIGIT ONE}" or "\N{RUMI DIGIT TWO}" produces proper output.

@jidanni
Copy link
Member Author

jidanni commented Jan 29, 2025

Would it also make sense to add the use utf8; to the example just to make sure the embedded string is interpreted correctly?

Near the top of the man page it already says:

℞ 0: Standard preamble
Unless otherwise notes, all examples below require this standard preamble to work correctly...

noted, not notes! S right next to D on the keyboard...

@vaitkus
Copy link
Contributor

vaitkus commented Jan 29, 2025

@jidanni Sorry, you are correct, I completely missed that part of the cookbook.

My comment about the $nv and your comment "notes" -> "noted" comment should probably still be addressed.

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