What I do in Eclipse/EPIC is change the perl executable line.

/ActivePerl/bin/perl -I/Users/apriven/Dev/Source/Actium/trunk -MActium::Eclipse

(Actium is the name of my project)

Then, whatever I want to do in Eclipse, but not when running otherwise, is done in the Actium::Eclipse module.

Here's my Actium::Eclipse module:

# Actium/Eclipse.pm # Originally, this did nothing of any use. However, requiring that thi +s file # be present was a cute way of figuring out whether the requiring # program is running under Eclipse or not. # Add -MActium::Eclipse to Eclipse's default perl comamnd line. # Then you can do: # if ($Actium::Eclipse::is_under_eclipse) { # do_something(); # } # else { # do_something_else; # } # Ta da. # Originally, I did that so that actium.pl could ask for a command lin +e if # none was provided. I later moved that routine to this module. So # Actium::Eclipse::get_command_line() gets the command line (using App +lescript... # slowly) from Eclipse. package Actium::Eclipse; use 5.010; use warnings; use strict; no warnings('redefine'); # without which, Eclipse complains because it sees this module twice w +hen # debugging this module our $is_under_eclipse = 1; sub get_command_line { my $history; if ( -f '/tmp/UnderEclipse.history' ) { open my $histfile, '<', '/tmp/UnderEclipse.history'; $history = readline($histfile); chomp $history; close $histfile; } else { $history = ""; } my $script = qq[osascript -e 'tell application "Eclipse" to get text return +ed of ( display dialog "$0\rCommand line:" default answer "$history" +buttons "OK" default button "OK" with title "Command line entry" ) '] +; my $newargs = `$script`; chomp $newargs; if ( $newargs ne $history ) { open my $histout, '>', '/tmp/UnderEclipse.history'; say $histout $newargs; close $histout; } return split( ' ', $newargs ); } ## <perltidy> end sub get_command_line 1;
-- Am I the only one who still cares about RT #67694?

In reply to Re: Setting environment-variables in Eclipse (EPIC)? [SOLVED] by Aaronrp
in thread Setting environment-variables in Eclipse (EPIC)? [SOLVED] by locked_user sundialsvc4

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.