0

The dexy documentation states than any language may be used. The tutorial use the py filter to run Python file, but I didn't find any filter to run Perl file.

I try to execute a very simple Perl file

I've tried to use the bash or sh filter, but with no luck, and didn't find any execute-or-like filter.

Am I missing something obvious ?

Orabîg
  • 11,718
  • 6
  • 38
  • 58
  • ~14 hours ago a "Perl filter" was added on github https://github.com/dexy/dexy/commit/63903b62476376c750d39b24a2520d51861468a4 – mghicks Aug 23 '14 at 08:20
  • Yes, just after I talk with Ana about this. She's very talented AND reactive. :) I'll write an answer below with various solutions – Orabîg Aug 23 '14 at 13:07

1 Answers1

0

Ok, here are the different solutions I found about this.

1. A perl filter now exist

Ok, Ana is the owner of this project and is very reactive. I asked her the question about dexy and perl on IRC, and tada ! Less than 1 hour later, there was a commit on the repository with perl support.

So, if you just get latest version and install it this way :

git clone https://github.com/dexy/dexy
cd dexy
sudo pip install -e .

You should have a perl filter. If you want to pass arguments to a script, just use the scriptargs setting.

2. Use a bash script

Another very simple solution is to embed the launch of a perl script into a sh/bash script, and use the sh/shint/bash filter that already exist.

3. Use bash script without additional files

If you fear that the latest solution will makes you add a lot of tiny scripts in your directories, you may use the contents feature of dexy. That way, the required one-liners are defined in dexy.yaml only. Something like :

- shell-myscript.sh|sh:
   - contents: "perl ./perl/myscript.pl --any-parameter"
   - perl/myscript.pl

is doing the job just fine for me.

Orabîg
  • 11,718
  • 6
  • 38
  • 58