cannot get perltidy to work

cowgod wrote on Fri Oct 31 20:01:06 CET 2008:
i've tried everything i can think of and i cannot get perltidy to work.
 i really hope someone can help me because the code i'm working on is in
dire need of tidying.  when i have a perl file open, I select Source->Format
and i'm greeted with the following error in my .metadata/.log file:

!SESSION 2008-10-31 11:51:47.397 -----------------------------------------------
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.epic.perleditor 4 0 2008-10-31 11:54:40.147
!MESSAGE Failed to execute command line: "C:\Perl\bin\perl.exe" "-IC:\workspace\.metadata\.plugins\org.epic.perleditor\perlutils\perltidy"
"-IC:\workspace\myproj\eclipse-shells" "-IC:\workspace\myproj" "-IC:\workspace\myproj\lib"
"perltidy" "-q" "--indent-columns=4" "--maximum-line-length=76" "--continuation-indentation=4"
"--nooutdent-labels" "--nooutdent-long-lines" "--paren-tightness=2" "--nospace-for-semicolon"
"--delete-closing-side-comments" "--opening-brace-always-on-right"
!STACK 0 The pipe has been ended
	at Method)
	at sun.nio.cs.StreamEncoder.implFlush(
	at sun.nio.cs.StreamEncoder.flush(
	at org.epic.core.util.ProcessExecutor.execute(
	at org.epic.core.util.ProcessExecutor.execute(
	at org.epic.core.util.PerlExecutor.execute(
	at org.epic.perleditor.editors.util.SourceFormatter.format(
	at org.epic.perleditor.editors.util.SourceFormatter.format(
	at org.epic.perleditor.actions.FormatSourceAction.runFormatter(
	at org.epic.perleditor.actions.FormatSourceAction.doRun(
	at org.eclipse.jface.action.Action.runWithEvent(
	at org.eclipse.ui.actions.RetargetAction.runWithEvent(
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(
	at org.eclipse.jface.action.ActionContributionItem.access$2(
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Display.runDeferredEvents(
	at org.eclipse.swt.widgets.Display.readAndDispatch(
	at org.eclipse.ui.internal.Workbench.runEventLoop(
	at org.eclipse.ui.internal.Workbench.runUI(
	at org.eclipse.ui.internal.Workbench.access$4(
	at org.eclipse.ui.internal.Workbench$
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.eclipse.equinox.launcher.Main.invokeFramework(
	at org.eclipse.equinox.launcher.Main.basicRun(
	at org.eclipse.equinox.launcher.Main.main(

jploski wrote on Fri Oct 31 20:08:03 CET 2008:
If you try running the same command line quoted in the error message in
the cmd.exe box, and redirect standard input/output, does it work then or
does it fail?

I mean something like

"C:\Perl\bin\perl.exe" "-IC:\workspace\.metadata\.plugins\org.epic.perleditor\perlutils\perltidy"
"-IC:\workspace\myproj\eclipse-shells" "-IC:\workspace\myproj" "-IC:\workspace\myproj\lib"
"perltidy" "-q" "--indent-columns=4" "--maximum-line-length=76" "--continuation-indentation=4"
"--nooutdent-labels" "--nooutdent-long-lines" "--paren-tightness=2" "--nospace-for-semicolon"
"--delete-closing-side-comments" "--opening-brace-always-on-right" < c:\path\to\the\
> c:\path\to\the\
cowgod wrote on Sat Jan  3 00:41:27 CET 2009:
If I run the command as you have it I get the error Can't open perl script
"perltidy": No such file or directory.  If I add the full path to perltidy
then the command executes successfully, but the resulting perl file is empty!
 Any other suggestions?
cowgod wrote on Sat Jan  3 00:56:07 CET 2009:
On a whim I decided to try Strawberry Perl @
instead of ActiveState Perl.  Now it works!  Go Strawberry Perl!
cowgod wrote on Fri Oct 31 20:23:15 CET 2008:
actually, no i can't.  i get the following error:

Can't open perl script "perltidy": No such file or directory

however, I have verified that the following files exist:

cowgod wrote on Fri Oct 31 21:30:08 CET 2008:
trying it on the command line with the full perltidy path doesn't produce
an error, but gives an empty result file.  why?

C:\>perl -I"C:\workspace\.metadata\.plugins\org.epic.perleditor\perlutils\perltidy"
"-q" "--indent-columns=4" "--maximum-line-length=76" "--continuation-indentation=4"
"--nooutdent-labels" "--nooutdent-long-lines" "--paren-tightness=2" "--nospace-for-semicolon"
"--delete-closing-side-comments" "--opening-brace-always-on-right" < c:\
> c:\
jploski wrote on Fri Oct 31 22:23:25 CET 2008:
Which version of EPIC is that? If 'stable' 0.5.x, then switch to the most
recent 'testing' 0.6.27, which has a more up-to-date version of perltidy.
cowgod wrote on Fri Oct 31 22:51:16 CET 2008:
i am using 0.6.25.  what i'd like to do is completely wipe out all version
of epic and start from scratch, however i really don't want to lose all
my config settings.  is there a file i can save away and then blast all
my epic folders and reinstall and then put the config back?
jploski wrote on Fri Oct 31 23:43:16 CET 2008:
Preferences are in workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.epic.perleditor.prefs

Launch configurations in workspace/.metadata/.plugins/org.eclipse.debug.core/.launches

They are not erased when you remove plugins/features afaik.

Note: The above is an archived snapshot of a forum thread. Use the original thread at to post comments.