Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm trying to compile custom package in Perl, but am getting into trouble.

I'm compiling with this :

pp -X JSON::XS -X JSON::DWIW -M XML/SAX/Expat.pm -M Net/OAuth/SignatureMethod/HMAC_SHA1.pm -M Net/OAuth/ProtectedResourceRequest.pm -M XML::LibXML::SAX::Parser -M XML::Simple -M RRD::Simple -M RRDs  -M Pie/KnowledgeBase/Memory.pm -M Pie/KnowledgeBase/Question/Console.pm -M Pie/Attribute/Memory.pm -M Pie/Sequence/Memory.pm -M Pie/KnowledgeBase/RuleParser/XML.pm -X DBD::SQLite -X DBD::CSV -X DBD::File -X DBD::Excel -I ./Eclipse/lib -I . -o Tinia_Visu_Event_Server ./Eclipse/bin/Tinia_Event_Visu_Server.pl

but when run, I get this error :

use Pie::KnowledgeBase::Rule::Memory said: Couldn't find a JSON packag +e. Need XS, JSON, or DWIW at Net/Twitter/Lite.pm line 11 BEGIN failed--compilation aborted at Net/Twitter/Lite.pm line 11. Compilation failed in require at Pie/KnowledgeBase/Rule/Memory.pm line + 19. BEGIN failed--compilation aborted at Pie/KnowledgeBase/Rule/Memory.pm +line 19. Compilation failed in require at (eval 29) line 1. BEGIN failed--compilation aborted at (eval 29) line 1.


I have JSON modules installed (cpan says they are up to date). I also specify those modules explicitly, but they are still missing on runtime...

What am I doing wrong ?

Thanks in advance,

regards, Rob.

Code tags fixed by GrandFather

Replies are listed 'Best First'.
Re: Problem compiling Per code with pp
by marto (Cardinal) on Nov 28, 2011 at 16:47 UTC

    Looks like something you're packaging includes Net::Twitter::Lite but you've excluded JSON::XS and JSON::DWIW. Net::Twitter::Lite requires one of the JSON modules, ensure that at least one is being included in the package. Also closing code tags are </code> rather than <\code>.