Commits

Rob Hoelz  committed ecbaae0

Reapply: Include slurpy parameters in the Perl 6 detection heuristic

  • Participants
  • Parent commits 8fda165

Comments (0)

Files changed (1)

File pygments/lexers/agile.py

             return 0.91
         if re.search(r'[$@%][!.][A-Za-z0-9_-]+', text): # Perl 6 member variables
             return 0.91
+        if re.search(r'[*][@%&]', text): # Slurpy parameters
+            # Scalar slurpies (*$slurp) are not included because they're more rare
+            # in Perl 6, and also (more importantly) they are a glob deference in
+            # Perl 5.
+            return 0.91
 
         for line in text.splitlines():
             if re.match(r'\s*(?:my|our)?\s*module', line): # module declarations