Skip Menu |
 

This queue is for tickets about the Perl-Critic-Pulp CPAN distribution.

Report information
The Basics
Id: 123922
Status: open
Priority: 0/
Queue: Perl-Critic-Pulp

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

Bug Information
Severity: Important
Broken in: 95
Fixed in: (no value)



Subject: ValuesAndExpressions::ProhibitUnknownBackslash doesn't handle utf8 source code
Download (untitled) / with headers
text/plain 846b
See this example program: #!/usr/bin/perl use strict; use warnings; use utf8; my $who = shift; print "$who is a 💩\n"; (Note that that symbol is UTF-8 encoding of \N{PILE OF POO}) When I try to tidy this I get: bash $ perlcritic -s ValuesAndExpressions::ProhibitUnknownBackslash insult.pl Fatal error while critiquing "insult.pl": Can't call method "child" on an undefined value at /opt/perl5.26.1/lib/site_perl/5.26.1/Perl/Critic/Policy/ValuesAndExpressions/ProhibitUnknownBackslash.pm line 321. Trace begun at /opt/perl5.26.1/lib/site_perl/5.26.1/Perl/Critic/Command.pm line 258 Perl::Critic::Command::_critique('HASH(0x168ffe0)', 'insult.pl') called at /opt/perl5.26.1/lib/site_perl/5.26.1/Perl/Critic/Command.pm line 64 Perl::Critic::Command::run at /opt/perl5.26.1/bin/perlcritic line 20
Subject: Re: [rt.cpan.org #123922] ValuesAndExpressions::ProhibitUnknownBackslash doesn't handle utf8 source code
Date: Sun, 24 Dec 2017 10:56:14 +1100
To: "MARKF via RT" <bug-Perl-Critic-Pulp [...] rt.cpan.org>
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
Download (untitled) / with headers
text/plain 424b
"MARKF via RT" <bug-Perl-Critic-Pulp@rt.cpan.org> writes: Show quoted text
> > Fatal error while critiquing "insult.pl": Can't call method "child" on an undefined value at /opt/perl5.26.1/lib/site_perl/5.26.1/Perl/Critic/Policy/ValuesAndExpressions/ProhibitUnknownBackslash.pm line 321.
Thanks, I didn't watch for the interpolate parse bit failing. New version 96 with that and a hack to try to defang chars PPI doesn't enjoy as code.


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.