1 ##############################################################################
2 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/RegularExpressions/ProhibitSingleCharAlternation.run $
3 # $Date: 2008-06-06 19:57:46 -0500 (Fri, 06 Jun 2008) $
6 ##############################################################################
12 m/\A [adiqrwx] \z/xms;
13 m/\A (?: qq | qr | qx | [qsy] | tr ) \z/xms;
14 m/\A (?: q[qrx] | [qsy] | tr ) \z/xms;
16 m/\A (?: a ) \z/xms; # bad form, but not a violation of this policy
17 m/\A (?: [a] ) \z/xms; # bad form, but not a violation of this policy
20 ## name metacharacters
24 m/(?: ^ | . | \d | $ )/xms;
26 ## name allowed to have one single character alternation
30 m/\A (?: a | do | in | queue | rue | woe | xray ) \z/xms;
32 ## name basic failures
34 ## optional_modules Regexp::Parser
37 m/\A (?: a | d | i | q | r | w | x ) \z/xms;
38 m/\A (?: qq| qr | qx | q | s | y | tr ) \z/xms;
40 ## name failing regexp with syntax error
44 m/\A (?: a | d | i | q | r | w | x ) ( \z/xms;
46 #-----------------------------------------------------------------------------
49 # cperl-indent-level: 4
51 # indent-tabs-mode: nil
52 # c-indentation-style: bsd
54 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :