Index: src/org/epic/core/util/ScriptExecutor.java
===================================================================
RCS file: /cvsroot/e-p-i-c/org.epic.perleditor/src/org/epic/core/util/ScriptExecutor.java,v
retrieving revision 1.9
diff -u -r1.9 ScriptExecutor.java
--- src/org/epic/core/util/ScriptExecutor.java	27 Sep 2007 17:37:51 -0000	1.9
+++ src/org/epic/core/util/ScriptExecutor.java	13 Sep 2011 09:19:44 -0000
@@ -201,12 +201,7 @@
         }
     }
 
-    private File extractScripts() throws CoreException
-    {
-        return ResourceUtilities.extractResources(PerlEditorPlugin.getDefault(), "perlutils/");
-    }
-
-    private File getWorkingDir() throws CoreException
+    protected File getWorkingDir() throws CoreException
     {
         try
         {
@@ -230,4 +225,9 @@
             return null;
         }
     }
+    
+    private File extractScripts() throws CoreException
+    {
+        return ResourceUtilities.extractResources(PerlEditorPlugin.getDefault(), "perlutils/");
+    }
 }
\ No newline at end of file
Index: src/org/epic/perleditor/editors/util/SourceCritic.java
===================================================================
RCS file: /cvsroot/e-p-i-c/org.epic.perleditor/src/org/epic/perleditor/editors/util/SourceCritic.java,v
retrieving revision 1.17
diff -u -r1.17 SourceCritic.java
--- src/org/epic/perleditor/editors/util/SourceCritic.java	21 Feb 2011 20:39:00 -0000	1.17
+++ src/org/epic/perleditor/editors/util/SourceCritic.java	13 Sep 2011 09:19:44 -0000
@@ -35,25 +35,13 @@
 
     public static Violation[] critique(IResource resource, ILog log)
     {
-        IFile file = (IFile) resource;
-        /*
-         * it seems that Perl::Critic does not like receiving the editor input when invoked via the
-         * perl executor (although it works fine from the command line outside of java land).
-         *
-         * this work around is ok for now b/c metrics are only run against a single file, but this
-         * won't work for entire directories at a time - perhaps a background job that processes
-         * each one?
-         */
-        ArrayList args = new ArrayList(1);
-        args.add(file.getRawLocation().toOSString());
-
         try
         {
             SourceCritic critic = new SourceCritic(log);
             // meh - not sure if i'm happy w/ this, but it's needed in getCommandLineOpts
             critic.resource = resource;
 
-            String output = critic.run(args).stdout;
+            String output = critic.run(new ArrayList(4)).stdout;
             return critic.parseViolations(output);
         }
         catch (CoreException e)
@@ -89,14 +77,25 @@
         	additionalOptions.add("--" + severity);
         }
 
-        additionalOptions.add("-verbose");
-        additionalOptions.add("%f~|~%s~|~%l~|~%c~|~%m~|~%e~|~%p" + getSystemLineSeparator());
+        additionalOptions.add("--verbose");
+        additionalOptions.add("%f~|~%s~|~%l~|~%c~|~%m~|~%e~|~%p%n");
         
         String otherOptions = PerlCriticPreferencePage.getOtherOptions();
         if(otherOptions.length() > 0)
         {
         	additionalOptions.addAll(CommandLineTokenizer.tokenize(otherOptions));
         }
+
+        IFile file = (IFile) resource;
+        /*
+         * it seems that Perl::Critic does not like receiving the editor input when invoked via the
+         * perl executor (although it works fine from the command line outside of java land).
+         *
+         * this work around is ok for now b/c metrics are only run against a single file, but this
+         * won't work for entire directories at a time - perhaps a background job that processes
+         * each one?
+         */
+        additionalOptions.add(file.getRawLocation().toOSString());
         
         return additionalOptions;
     }
@@ -117,6 +116,14 @@
         return "";
     }
 
+    protected File getWorkingDir() throws CoreException
+    {
+        // Run perlcritic from project folder, not from the the one which
+        // contains the script to be checked, in hope that some violations
+        // of the sort "this file is in wrong directory" can be avoided that way. 
+        return new File(resource.getProject().getLocation().toOSString());
+    }
+    
     private final Violation parseLine(String toParse)
     {
         String[] tmp = toParse.split("~\\|~");
