I am happy to announce the latest release of Padre, the Perl IDE. There are many changes as listed in the Changes file
The major outline is
You can download and install it from a nearby CPAN mirror. More detailed instructions can be found on Download
Windows users might want to download the latest Strawberry Perl release (5.10.0.3) as it already supports Wx installation without the extra manual work earlier releases required.
When running a Perl file, chdir to the dir of the file seems obvious, but it isn't in all cases. There are a couple of scenarios you need to support when you "run" a perl file.
The most common mistake seems to be to ignore @INC and just leave it as is. But that only works for the simplest script with no application classes.
This is the default config section of PerlySense for determining how and where to run something from:
#These are evaluated in order to find a way to run a file. First
#match is used.
run_file:
-
command: "prove -v ${INC} \"${SOURCE_FILE}\""
moniker: Test
rex: \.t$
run_from: source_root_directory
-
command: "perl -c ${INC} \"${SOURCE_FILE}\" 2>&1| perl -ne \"/Subroutine \w+ redefined at/ or print\""
moniker: Module
rex: \.pm$
run_from: source_root_directory
-
command: "perl ${INC} \"${SOURCE_FILE}\""
moniker: Script
rex: \.pl$
run_from: file_directory
#This is a catch-all for all other types of files
-
command: "perl ${INC} \"${SOURCE_FILE}\""
moniker: 'Script (no
rex: .
run_from: file_directory
Then there are other types of files that may need to be "run" as well. At work we have a YAML based test framework for testing REST APIs. So when I have one of those yaml files open, I can "run" it if I have something like the following in the config:
-
command: "prove -v ${INC} t/acceptance.t
moniker: Test
rex: acceptance.*?\.yaml$
run_from: source_root_directory