1

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.

Tiago Veloso
  • 8,513
  • 17
  • 64
  • 85
  • 1
    Should not it be "-M Text::BibTeX" (not Test)? – bvr Nov 20 '10 at 15:59
  • You are right I have misspelled it, but that was not the problem. – Tiago Veloso Nov 20 '10 at 16:51
  • You may want to post the error message that you get either when you create the executable or when you run it. Otherwise, nobody can help you. Does it complain about a missing module or a missing .so? – tsee Nov 23 '10 at 23:03

3 Answers3

1

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.

Joel Berger
  • 20,180
  • 5
  • 49
  • 104
1

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
HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133
Leolo
  • 1,327
  • 9
  • 14
-1

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

user449592
  • 208
  • 1
  • 3