
"""This module exports the PerlEpages6 plugin class."""

import sublime
from SublimeLinter.lint import Linter, util

class PerlEpages6(Linter):

    """Provides an interface to perl on an epages6 virtual machine from a local machine.
    Requires a configured copy of the Epages6 plugin (see https://github.com/ePages-rnd/sublimetext-epages6)."""

    def cmd(self):
        return [self.executable_path, sublime.packages_path() +  '/Epages6/ep6-tools.py', '--vm', self.view.settings().get('ep6vm')['vm'], '--lint', '--file', self.view.file_name(), '--user', 'root', '--password', 'qwert6', '--ignore-me', '@'];

    executable = 'python3'
    syntax = ('modernperl', 'perl')
    regex = r'(?P<message>.+?) at .+? line (?P<line>\d+)(, near "(?P<near>.+?)")?'
    error_stream = util.STREAM_BOTH
    tempfile_suffix = 'pm'


"""This module exports the PerlEpages6 plugin class."""

import sublime
from SublimeLinter.lint import Linter, util

class PerlEpages6(Linter):

    """Provides an interface to perl on an epages6 virtual machine from a local machine.
    Requires a configured copy of the Epages6 plugin (see https://github.com/ePages-rnd/sublimetext-epages6)."""

    def cmd(self):
        if self.view.settings().get('ep6vm'):
        	return [self.executable_path, sublime.packages_path() +  '/Epages6/ep6-tools.py', '--vm', self.view.settings().get('ep6vm')['vm'], '--lint', '--file', self.view.file_name(), '--user', 'root', '--password', 'qwert6', '--ignore-me', '@'];
        else:
        	return []

    executable = 'python3'
    syntax = ('modernperl', 'perl')
    regex = r'(?P<message>.+?) at .+? line (?P<line>\d+)(, near "(?P<near>.+?)")?'
    error_stream = util.STREAM_BOTH
    tempfile_suffix = 'pm'

Check if epages6 settings are configured
Check if epages6 settings are configured

  
  """This module exports the PerlEpages6 plugin class."""
  
  import sublime
  from SublimeLinter.lint import Linter, util
  
  class PerlEpages6(Linter):
  
      """Provides an interface to perl on an epages6 virtual machine from a local machine.
      Requires a configured copy of the Epages6 plugin (see https://github.com/ePages-rnd/sublimetext-epages6)."""
  
      def cmd(self):
+         if self.view.settings().get('ep6vm'):
-         return [self.executable_path, sublime.packages_path() +  '/Epages6/ep6-tools.py', '--vm', self.view.settings().get('ep6vm')['vm'], '--lint', '--file', self.view.file_name(), '--user', 'root', '--password', 'qwert6', '--ignore-me', '@'];
+         	return [self.executable_path, sublime.packages_path() +  '/Epages6/ep6-tools.py', '--vm', self.view.settings().get('ep6vm')['vm'], '--lint', '--file', self.view.file_name(), '--user', 'root', '--password', 'qwert6', '--ignore-me', '@'];
+         else:
+         	return []
  
      executable = 'python3'
      syntax = ('modernperl', 'perl')
      regex = r'(?P<message>.+?) at .+? line (?P<line>\d+)(, near "(?P<near>.+?)")?'
      error_stream = util.STREAM_BOTH
      tempfile_suffix = 'pm'
  
Check if epages6 settings are configured
## Code Before:

"""This module exports the PerlEpages6 plugin class."""

import sublime
from SublimeLinter.lint import Linter, util

class PerlEpages6(Linter):

    """Provides an interface to perl on an epages6 virtual machine from a local machine.
    Requires a configured copy of the Epages6 plugin (see https://github.com/ePages-rnd/sublimetext-epages6)."""

    def cmd(self):
        return [self.executable_path, sublime.packages_path() +  '/Epages6/ep6-tools.py', '--vm', self.view.settings().get('ep6vm')['vm'], '--lint', '--file', self.view.file_name(), '--user', 'root', '--password', 'qwert6', '--ignore-me', '@'];

    executable = 'python3'
    syntax = ('modernperl', 'perl')
    regex = r'(?P<message>.+?) at .+? line (?P<line>\d+)(, near "(?P<near>.+?)")?'
    error_stream = util.STREAM_BOTH
    tempfile_suffix = 'pm'

## Instruction:
Check if epages6 settings are configured
## Code After:

"""This module exports the PerlEpages6 plugin class."""

import sublime
from SublimeLinter.lint import Linter, util

class PerlEpages6(Linter):

    """Provides an interface to perl on an epages6 virtual machine from a local machine.
    Requires a configured copy of the Epages6 plugin (see https://github.com/ePages-rnd/sublimetext-epages6)."""

    def cmd(self):
        if self.view.settings().get('ep6vm'):
        	return [self.executable_path, sublime.packages_path() +  '/Epages6/ep6-tools.py', '--vm', self.view.settings().get('ep6vm')['vm'], '--lint', '--file', self.view.file_name(), '--user', 'root', '--password', 'qwert6', '--ignore-me', '@'];
        else:
        	return []

    executable = 'python3'
    syntax = ('modernperl', 'perl')
    regex = r'(?P<message>.+?) at .+? line (?P<line>\d+)(, near "(?P<near>.+?)")?'
    error_stream = util.STREAM_BOTH
    tempfile_suffix = 'pm'
