Skip to content

Module-Metadata: Fix UTF-8 BOM detection for non-ASCII#37

Open
khwilliamson wants to merge 2 commits into
Perl-Toolchain-Gang:masterfrom
khwilliamson:master
Open

Module-Metadata: Fix UTF-8 BOM detection for non-ASCII#37
khwilliamson wants to merge 2 commits into
Perl-Toolchain-Gang:masterfrom
khwilliamson:master

Conversation

@khwilliamson

Copy link
Copy Markdown

No description provided.

@karenetheridge

Copy link
Copy Markdown
Member

Is there any way to test this, so someone doesn't come along later and go "well tests pass without this, so I guess it's not necessary"?

@Leont

Leont commented Dec 19, 2021

Copy link
Copy Markdown
Member

Essentially this is a constant, and hence should probably be computed in a BEGIN block?

@khwilliamson

khwilliamson commented Dec 24, 2021

Copy link
Copy Markdown
Author

Without this patch, it fails on z/OS EBCDIC with:

#   Failed test 'version for ASCII package'
#   at t/encoding.t line 27.
#          got: undef
#     expected: '1'

#   Failed test 'version for Unicode package'
#   at t/encoding.t line 28.
#          got: undef
#     expected: '2'
# Looks like you failed 2 tests of 12.
../cpan/Module-Metadata/t/encoding.t ................................. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/12 subtests

So, I guess I'm claiming there already is a test.

@khwilliamson

Copy link
Copy Markdown
Author

BEGIN block comment is now 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.

3 participants