I am using Mac OS X 10.8 and want to run latexindent.pl perl script in my latex files. This script runs https://github.com/cmhughes/latexindent.plx . When I run this script on latexfile , I get this error message:
Can't locate File/HomeDir.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.4/darwin-thread-multi-2level /Library/Perl/Updates/5.12.4 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at helloworld.pl line 10. BEGIN failed
It seems that I am missing the File :: HomeDir module in perl, so I tried loading it using:
sudo perl -MCPAN -e 'install File::HomeDir ",
I get the following error:
Unable to find the method of the "install" object through the package "File :: HomeDir".
I managed to install the YAML::Tiny package without any problems.
I tried to run:
1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 use FindBin; 6 use YAML::Tiny; 7 use File::Copy; 8 use File::Basename; 9 use Getopt::Std; 10 use File::HomeDir; 11 12 print "hello world"; 13 exit;
and received the same error message as above ...
Does anyone know what to do?
perl indentation latex
Yang min wang
source share