Tiago Veloso
Tiago Veloso

Reputation: 8563

Problems with Perl executable with PP

I am trying to create an *nix executable from a Perl script that uses a CPAN module named Text::BibTeX.

I have been trying to use pp, to pack everything, with no success.

I have tried

pp -o outfile src.pl

pp -M Text::BibTeX -o outfile src.pl

But it's not working. Or better the executable works on my machine, but not on two other machines I have access to. On one of those machines Text::BibTeX is also installed on the other only perl.

Can somebody help?

Some more details about the script.

It's a preprocessor for bib files in order to create CSV files from certain fields of the bib.

Normal usage is:

perl Bib2CSV.pl file.bib

When I run pp -x Bib2CSV.pl file.bib it complains about missing input file:

ForkBook:plbib2csv (master) fork$ pp -x Bib2CSV.pl bibliography.bib
Missing input file.
SYSTEM ERROR in executing Bib2CSV.pl: 512 at /Library/Perl/5.10.0/Module/ScanDeps.pm line 1255.

The source ccode is available at https://github.com/TiagoVeloso/Bib2CSV

It also has a Java Port that I am also working on.

Upvotes: 1

Views: 753

Answers (3)

Leolo
Leolo

Reputation: 1337

Is bibliography.bib part of the PAR, or is it input the program's execution? If the latter, you want :

pp -l /usr/lib/libbtparse.so -B -S -o bib2csv bib2csv.pl
./bib2csv bibliography.bib

If the former, you want :

pp -l /usr/lib/libbtparse.so -B -S -a bibliography.bib -o bib2csv bib2csv.pl

What's more, a PAR file is a ZIP file. As is a PAR executable. You can easily see what is inside the par with unzip -t :

unzip -t bib2csv | grep Text

Upvotes: 1

user449592
user449592

Reputation: 208

Try using $ARGV[0] instead of shift to pick up the command line argument

Upvotes: -1

Joel Berger
Joel Berger

Reputation: 20280

With pp, I always have had the best success with the -x flag (I think it was) which runs the program and check for dependencies live. See if that helps.

Upvotes: 1

Related Questions