I want to write an arara rule for perl scripts, especially for fancy-preview. (Another test-script: latexcount.)
Edit:
In the Command-Line
perl fancy-preview jobname.tex
works!I have installed
ActiveState Perl
This does not work
!config
# perl rule for arara
# version: 0.1
# requires arara 3.0+
identifier: perl
name: Perl
command: <arara> @{program} @{script} @{getBasename(file)} @{options}
arguments:
- identifier: program
flag: <arara> @{parameters.program}
default: cmd /c perl
- identifier: script
flag: <arara> @{parameters.script}
default: fancy-preview
- identifier: options
flag: <arara> @{parameters.options}
default: --fancy_options="previewall,nosoap"
Error Comment:
Running Perl... Can't locate Config/IniFiles.pm in @INC (@INC contains: C:/texlive/2013/tlpkg/tlperl/lib c:/texlive/2013/tlpkg/tlperl/lib .) at fancy-preview line 227. BEGIN failed--compilation aborted at fancy-preview line 227. FAILURE C:\texlive\2013\bin\win32\runscript.tlu:650: command failed with exit code 1: java.exe -jar c:/texlive/2013/texmf-dist/scripts/arara/arara.jar interaktiv2.tex --verbose --log
What can I do?
EDIT1:
The "rule" above is a first draft-version.
For the result, I thought about an inputpath: 'C:/MyPerlScripts/...'
or so on - so I have not to build a coupled motion for my perl-scripts and could store them under a central place. But for this and others, the rule has to run ;)
...
EDIT2:
If I change
- identifier: program
flag: <arara> @{parameters.program}
default: cmd /c start perl
there is no error-messgage but the perls scripts were not runned (ok, this only for Windows, but it does not work) - I do not understand! :(
Edit3:
Same effect as Edit2:
- identifier: program
flag: <arara> @{parameters.program}
default: cmd /c start C:/Perl/bin/perl.exe
Same without 'start':
Running Perl...
Perl lib version (5.16.2) doesn't match executable 'fancy-preview.pl' version (v5.16.3) at C:/texlive/2013/tlpkg/tlperl/lib/Config.pm line 60.
Compilation failed in require at C:/texlive/2013/tlpkg/tlperl/lib/DynaLoader.pm line 22 ....
A litte message of partially success
I think the problem is partly the script fancy-preview
and partly arara
.
Because: If I use the script latexcount with "perl.yaml
" as given above on the following document
% arara: perl: { script: latexcount.pl }
\documentclass{article}
\begin{document}
Count these words!
\end{document}
I get
Can't open --fancy_options=previewall,nosoap: No such file or directory at latexcount.pl line 72, <> line 8.
3 words in the main text
in the footnotes
3 total
Status: SUCCESS
This is correct in each line!
I think (at fancy-preview
etc.) arara
stops, if there is a warning or something else. In that case, I do not know, what to do - this could be arara
-interna or not? The authors-team are the last hope :()
perl
command you are aiming for from the command line withoutarara
being involved? Because the error looks likeperl
can't find one of the modules required byfancy-preview
and that wouldn't be a problem with thearara
rule.perl
you have installed is not part of TeX Live, correct? In that case, I'd suggest specifying the full path to the correctperl
. I suspect - though I'm not sure - that whenarara
runs it is picking up a differentperl
from the version you are getting at the command line. Notice that@INC
only includes directories for what I assume is the TeX Liveperl
. [I do not use Windows so cannot be sure of this. But that's certainly what it looks like.] Also did you install theperl
library mentioned in the link you posted (Config::IniFiles
)?C:/texlive/2013/tlpkg/tlperl/lib/DynaLoader.pm
because that library will match TL'sperl
not your systemperl
. That's what the mismatch error is complaining about. It is using the wrong@INC
. I don't know what the values should be on Windows but you need to put the relevant directories probably before the TL ones in the equivalent ofPATH
. On my system, for example, I'd need to put/usr/bin/vendor_perl:/usr/bin/core_perl
before/usr/local/texlive/bin
if I hadperl
binaries in TL which I wished to override.