"Coul not find a suitable Class::Load implementation"

I am bulding an executable with PAR but It gives me the next error:

"Could not find a suitable Class::Load implementation : at Class/Load.pm line 51.

I would like to kwon why It makes that error.

Anyone could givbe me a solution please?

Upvotes: 1

Views: 1407

Answers (2)

Tucan
Tucan

Reputation: 61

I solved it running pp with both -x and -c parameters

pp -x -c script.pl

Upvotes: 0

tuomassalo
tuomassalo

Reputation: 9101

For some reason PAR can't find Class::Load::XS or Class::Load:PP.

You can try if those are at all on your include path with eg.: perl -MClass::Load::PP -e1

If not, try to (re?)install them or fix your classpath. The corresponding files in your filesystem should be Class/Load/XS.pm and Class/Load/PP.pm.

If the oneliner doesn't give you an error, it could be that PAR uses different include paths.

You can debug your include paths with eg. perl -le 'print for @INC' and temporarily add something to the path with the -I/my/path switch. Or you can use lib '/my/path'; in you perl files.

Upvotes: 2

Related Questions