Skip Menu |
 

This queue is for tickets about the Acme-LookOfDisapproval CPAN distribution.

Report information
The Basics
Id: 110801
Status: new
Priority: 0/
Queue: Acme-LookOfDisapproval

People
Owner: Nobody in particular
Requestors: TEAM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.006
Fixed in: (no value)

Attachments


Subject: Load via -M
Download (untitled) / with headers
text/plain 553b
This is entirely not Acme::ಠ_ಠ's fault, but this seemed like a good place to mention it: $ perl -MAcme::ಠ_ಠ Unrecognized character \xE0; marked by <-- HERE after use Acme::<-- HERE near column 11. this works: $ perl -Mutf8 -MAcme::ಠ_ಠ -e1 $ but it'd be nice if PERL_UNICODE=A could be used to get the same result. The attached perl patch (against perl-5.22.1) allows this and also -M with arbitrary unicode module names. $ perl -CA -MAcme::ಠ_ಠ $ echo 'use utf8; package ಠ; 1' > ಠ.pm $ perl -CA -Mಠ -e1 $ cheers, Tom
Subject: 2015-12-30-perl-utf8-module.patch
commit bab01271ce6bccfbc0059beb0ab6b9b05ca6cd08 Author: Tom Molesworth <TEAM@cpan.org> Date: Wed Dec 30 19:22:08 2015 +0000 Attempt to support UTF8 in module names from -Mxxx diff --git a/perl.c b/perl.c index 16a6ca4..8ef1193 100644 --- a/perl.c +++ b/perl.c @@ -3330,8 +3330,8 @@ Perl_moreswitches(pTHX_ const char *s) if (*s == '-') { use = " no "; ++s; } sv = newSVpvn(use,4); start = s; - /* We allow -M'Module qw(Foo Bar)' */ - while(isWORDCHAR(*s) || *s==':') { + /* We allow -M'Module qw(Foo Bar)' - and it'd be nice to allow -Mಠas well */ + while(*s && *s != '=') { if( *s++ == ':' ) { if( *s == ':' ) s++; @@ -3363,6 +3363,12 @@ Perl_moreswitches(pTHX_ const char *s) sv_catpvs(sv, "\0)"); } s = end; + /* If we're pretending to be Unicode, let's go all the way - + * the idea is that we may want to load a module such as ಠ.pm + * if the filesystem would be so kind as to be in utf8 + */ + if (PL_unicode & PERL_UNICODE_ARGV_FLAG) + SvUTF8_on(sv); Perl_av_create_and_push(aTHX_ &PL_preambleav, sv); } else


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.