class_docstr: For `Perl 6 <http://www.perl6.org>`_ source code.
  
  .. versionadded:: 2.0
code: def analyse_text(text):
      def strip_pod(lines):
          in_pod = False
          stripped_lines = []
  
          for line in lines:
              if re.match(r"^=(?:end|cut)", line):
                  in_pod = False
              elif re.match(r"^=\w+", line):
                  in_pod = True
              elif not in_pod:
                  stripped_lines.append(line)
  
          return stripped_lines
  
      # XXX handle block comments
      lines = text.splitlines()
      lines = strip_pod(lines)
      text = "\n".join(lines)
  
      if shebang_matches(text, r"perl6|rakudo|niecza|pugs"):
          return True
  
      saw_perl_decl = False
      rating = False
  
      # check for my/our/has declarations
      if re.search(
          r"(?:my|our|has)\s+(?:"
          + Perl6Lexer.PERL6_IDENTIFIER_RANGE
          + r"+\s+)?[$@%&(]",
          text,
      ):
          rating = 0.8
          saw_perl_decl = True
  
      for line in lines:
          line = re.sub("#.*", "", line)
          if re.match(r"^\s*$", line):
              continue
  
          # match v6; use v6; use v6.0; use v6.0.0;
          if re.match(r"^\s*(?:use\s+)?v6(?:\.\d(?:\.\d)?)?;", line):
              return True
          # match class, module, role, enum, grammar declarations
          class_decl = re.match(
              r"^\s*(?:(?P<scope>my|our)\s+)?(?:module|class|role|enum|grammar)",
              line,
          )
          if class_decl:
              if saw_perl_decl or class_decl.group("scope") is not None:
                  return True
              rating = 0.05
              continue
          break
  
      return rating
  
file_path: catboost/contrib/python/Pygments/py2/pygments/lexers/perl.py
imports: import re
  from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, bygroups, using, this, default, words
  from pygments.token import Text, Comment, Operator, Keyword, Name, String, Number, Punctuation
  from pygments.util import shebang_matches
label_desc: Use image node_id 6 for calling the Perl6Lexer obj's underlying member method code with example usage: obj.analyse_text(text) and returns: rating, stripped_lines, True, True, True