Posts Tagged ‘“EPIC”’

Pass command line arguments to perl in EPIC

I am really getting more and more involved to EPIC now a days for editing my perl programs as it has lots of killer features.I would say if you will use this you will really get addicted to it.Already I have discussed about the EPIC INTEGRATION WITH ECLIPSE . Before three days I had a nightmare in finding a solution in eclipse.The question was

Can we pass command line argument in EPIC?

I searched in google but not found any relevant topic.Then after going through the documentation of EPIC given in their website I got some clue and after some R&D I found out how to do.If you are facing the same problem please follow the following steps to pass command line argument in EPIC.

Step-1:Open Eclipse and write your program and save it using some name.For me its

Run–>Run Configurations as shown in fugure 1

Figure-1:Run command tool in EPIC

Step-2:Afer running the configuration you will get a screen like the below image.

Figure-2: EPIC Run tool configuration window

Here myproject name in testperl and file name is which will varry on your case.

Step-3:Now navigate to the Arguments tab and add your argument shown in figure-3

Figure-3:Argument passing window in EPIC

In my case I need to pass a filename as argument which is “abc.txt” .Keep in mind to provide the arguments under program arguments only.Now click on Apply and then click on Run.

Step-4:-Now you should be able to get your desired output.


Epic:The most powerfull opensource perl editor

EPIC with Eclipse

Are you looking for a good Perl editor? Gone are the days when Perl programmer have to face tough situations like writing programs either in notepad or vi editor or Emacs .These editors neither have compile option nor have run option and also you have to spend to spend most of your day switching between editor and the command line. Now a lots of editors are there which are dedicated to Perl but I like Eclipse. There are some reasons to like as

1. It’s absolutely free(open source)

2. Its like one editor for multiple languages (You can run java,php,perl etc )

3. You can debug your programs

4. No need to install (runs from source)

You may be wondering how can I edit Perl in eclipse as most of the people know that this editor is used for java only.Yes that’s true but you can install the EPIC plug-in for Eclipse which supports Perl .After installing EPIC you can get all the feature you want to be in a editor like Syntax highlighting,  Source formatter, Perldoc support etc .For more details on features you can refer to the EPIC website here

I will be guiding you through the installation process.

Installation of EPIC:


You will need the following tools before you can make good use of EPIC:

  • Eclipse(I would recommend Eclipse Classic  version)
  • Java (jdk or jre)
  • Perl V5.8.6 or higher (on Windows, use ActivePerl)
  • PadWalker Perl module at CPAN.
  • EPIC (Eclipse Perl Integration), an open source Perl IDE for the Eclipse platform

Installing the EPIC plug-in in Eclipse

Step-1:-Before looking at EPIC,make sure you have perl installed in your system.To know that you can type in your shell or command prompt perl –v.perl interpreter comes with most  UNIX/Linux host. On Windows, you can use the ActivePerl interpreter and set the environmental variable(see below how to set environment varriable).

  • In the next step install  PadWalker module for Perl.
  • Now lunch Eclipse and follow the steps to install the EPIC plugin.

1. Choose Help > check for updates, as shown in Figure 1.

Figure 1. The Software Update window

2.Now you will get the sotware update window like this.

Figure 2. The Software Update window 2

3.Enter the following URL (, as shown in Figure 2 and click on Add.

4.Then select EPIC Main Components and click Next.

5.If any warning comes about security or anything go ahead and say yes.No need to worry.

6. Then follow the on-screen process and install the plug-in.

7.After installation gets over you have to restart eclipse.

Quick configuration

  • After installation you have to know on how you use and work with EPIC plug-in  Before that we will have a look at the preferences panel to get an idea of the sort of facilities that are available when using the plug-in.
  • To access the preferences for EPIC, open the standard Eclipse Preferences Window(Goto Window->Preferences) and choose the Perl EPIC folder from the navigation panel on the left, as shown here in Figure 3.

Figure 3. EPIC Preferences

The preferences are split into sections, starting with the general preferences for the

  • General Preferences — Sets the location of the Perl executable, interpreter, execution model, and the period to wait before the code is checked in the background.
  • Editor — Sets editor preferences, including the colors used for highlighting different components, annotation formats, and so on.
  • Content Assist — Sets the characters that trigger auto-completion.
  • Folding:- The editor supports folding of POD comments and subroutines. On big files source folding can decrease performance. So if you experience slowdowns, disabling source folding might help.
  • Templates — Sets up templates of code that can be inserted directly into your code to speed development time.
  • Source Formatter — Sets formatting preferences.
  • Task Tags — Sets task tags, which are quick notes that take you back to a specific location.

Windows notes

  • When using the EPIC plug-in within Eclipse under Windows, there are some tricks that will improve your interaction between components.
  • If you are using ActiveState’s ActivePerl distribution, change the Perl executable (asset in the General Preference panel) to the absolute path of perl executable(C:\Perl\perl.exe) instead of  wperl.exe(C:\Perl\ wperl.exe) executable. This will prevent a command prompt window being displayed each time when you request for perldoc.
  • If you are using the Cygwin version of Perl, ensure that the mount command, part of the standard Cygwin installation, is available through your system path. You canverify this by checking the values of environment variables.

To check or set environmental variable on window

1. Open the System Control Panel (usually in Start > Control Panels >System, or right-click on My Computer and select Properties).

2. Switch to the Advanced panel.

3. Click Environment Variables. You should be presented with a window like that shown in Figure 4.


Figure 4. System and user environment variables in Windows

4.Check the value of the PATH variable. If the Perl or Cygwin binary directories are not listed, add them to the path value. Individual directories are separated by a semicolon.

Creating projects and files

Creating a new project

Let’s create a new Perl project. Because EPIC provides a new nature, you can

create a new project to build your Perl application.

Create a new project by selecting it from the list of available project types. Choose

File >New > Perl Project. You can see the resulting window in Figure 5.

Figure 5. Creating a new Perl project

Give the project a name and specify the workspace for the project, or simply use the default workspace.

Eclipse should change to the Perl perspective automatically when you create a new

Perl project. The Perl perspective includes a number of specific panels that will help

you as you start to write Perl script.

  • If Eclipse does not automatically switch to the Perl perspective, you can switch to it using Window > Open Perspective and selecting Perl from the list of perspectives.

You can see an example of this perspective in Figure 6, here with some open and

active files and views.

Figure 6. The Perl perspective

You can see from Figure 6 that the perspective includes many different panels

(called Views in Eclipse), including:

Package explorer view — This shows the layout of your project (files,

modules, and scripts).

Outline view for the current file — This shows the list of modules

imported and the list of functions defined within the current file.

Standard editor/file interface — This will show the source individual files

in the project.

Tasks view — This shows a list of registered tasks.

Console view — This is the standard output from your application.

Problems — This view highlights and provides links to errors in your code

within the current project.

Categories: Perl Tags: , , , ,