unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47598: cperl-mode: Highlighting confused with ternary and -x
@ 2021-04-05  0:04 E. Choroba
  2021-04-06 18:33 ` bug#47598: cperl-mode: Highlighting confused with ternary and -x [PATCH] Harald Jörg
  0 siblings, 1 reply; 3+ messages in thread
From: E. Choroba @ 2021-04-05  0:04 UTC (permalink / raw)
  To: 47598

When combining the ternary operator with file tests using the default 
argument, cperl-mode gets confused.

For example:

my $f = -f ? 'file'
       : -l ? [readlink]
       : -d ? 'dir'
            : 'unknown';

It seems to think the ?'s are not part of a ternary operator, but rather a 
match-once operator. Note that m?? without m results in a syntax error since 
Perl 5.22.

Ch.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-06 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05  0:04 bug#47598: cperl-mode: Highlighting confused with ternary and -x E. Choroba
2021-04-06 18:33 ` bug#47598: cperl-mode: Highlighting confused with ternary and -x [PATCH] Harald Jörg
2021-05-06 10:34   ` bug#47598: cperl-mode: Highlighting confused with ternary and -x Lars Ingebrigtsen

unofficial mirror of bug-gnu-emacs@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/emacs-bugs/0 emacs-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 emacs-bugs emacs-bugs/ https://yhetil.org/emacs-bugs \
		bug-gnu-emacs@gnu.org
	public-inbox-index emacs-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.bugs
	nntp://news.gmane.io/gmane.emacs.bugs


code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs.git

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git