Month: March 2014

App::Fatpacker stuffs they never inform you about

I don’t own this picture. Copyright to whoever owns this

Neat lil app to pack the dependancy in your script without having to carry all your dependancies with your script each time.

Skip at the last few lines if you just want the solution;

Problem is :

Can't locate Config/Any.pm in @INC (@INC contains: FatPacked::19874200=HASH(0x12f4198) /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.
BEGIN failed--compilation aborted at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.
Can't locate Config/Any.pm in @INC (@INC contains: FatPacked::14311832=HASH(0xda6198) /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.
BEGIN failed--compilation aborted at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.
Can't locate Config/Any.pm in @INC (@INC contains: FatPacked::26575256=HASH(0x1958198) /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/dafuq_you_dont_need_to_know_scr
/masterXMLwriterFAT.pm line 242.
BEGIN failed--compilation aborted at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.
Can't locate Config/Any.pm in @INC (@INC contains: FatPacked::27951512=HASH(0x1aa8198) /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.
BEGIN failed--compilation aborted at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.
Can't locate Config/Any.pm in @INC (@INC contains: FatPacked::11256216=HASH(0xabc198) /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.
BEGIN failed--compilation aborted at /usr/local/bin/dafuq_you_dont_need_to_know_scr/masterXMLwriterFAT.pm line 242.


A little bit of investigation:

$ cat fatpacker.trace
warnings/register.pm
File/Spec/Functions.pm
List/Util.pm
Cwd.pm
File/Find.pm
File/Copy.pm
base.pm
Convert/UU.pm
Config.pm
File/Basename.pm
Carp.pm
Scalar/Util.pm
File/Spec/Unix.pm
vars.pm
File/Spec.pm
overload.pm
Devel/InnerPackage.pm
Module/Pluggable/Object.pm
Config/Any.pm

$ cat packlists
/home/myusername/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Convert/UU/.packlist
/usr/local/lib/perl/5.14.2/auto/Config/Any/.packlis

$ cat packlists |while read line; do cat $line; done
/home/myusername/perl5/bin/puudecode
/home/myusername/perl5/bin/puuencode
/home/myusername/perl5/lib/perl5/Convert/UU.pm
/home/myusername/perl5/man/man1/puudecode.1p
/home/myusername/perl5/man/man1/puuencode.1p
/home/myusername/perl5/man/man3/Convert::UU.3pm
/usr/local/man/man3/Config::Any.3pm
/usr/local/man/man3/Config::Any::Base.3pm
/usr/local/man/man3/Config::Any::General.3pm
/usr/local/man/man3/Config::Any::INI.3pm
/usr/local/man/man3/Config::Any::JSON.3pm
/usr/local/man/man3/Config::Any::Perl.3pm
/usr/local/man/man3/Config::Any::XML.3pm
/usr/local/man/man3/Config::Any::YAML.3pm
/usr/local/share/perl/5.14.2/Config/Any.pm
/usr/local/share/perl/5.14.2/Config/Any/Base.pm
/usr/local/share/perl/5.14.2/Config/Any/General.pm
/usr/local/share/perl/5.14.2/Config/Any/INI.pm
/usr/local/share/perl/5.14.2/Config/Any/JSON.pm
/usr/local/share/perl/5.14.2/Config/Any/Perl.pm
/usr/local/share/perl/5.14.2/Config/Any/XML.pm
/usr/local/share/perl/5.14.2/Config/Any/YAML.pm

$ cat packlists |while read line; do cat $line|xargs ls -l; done
-r-xr-xr-x 1 myusername myusername 1010 Feb 28 15:28 /home/myusername/perl5/bin/puudecode
-r-xr-xr-x 1 myusername myusername 980 Feb 28 15:28 /home/myusername/perl5/bin/puuencode
-r--r--r-- 1 myusername myusername 5332 Mar 3 2008 /home/myusername/perl5/lib/perl5/Convert/UU.pm
-r--r--r-- 1 myusername myusername 4506 Feb 28 15:28 /home/myusername/perl5/man/man1/puudecode.1p
-r--r--r-- 1 myusername myusername 4496 Feb 28 15:28 /home/myusername/perl5/man/man1/puuencode.1p
-r--r--r-- 1 myusername myusername 5822 Feb 28 15:28 /home/myusername/perl5/man/man3/Convert::UU.3pm
-r--r--r-- 1 root root 14038 Feb 26 16:17 /usr/local/man/man3/Config::Any.3pm
-r--r--r-- 1 root root 5126 Feb 26 16:17 /usr/local/man/man3/Config::Any::Base.3pm
-r--r--r-- 1 root root 5113 Feb 26 16:17 /usr/local/man/man3/Config::Any::General.3pm
-r--r--r-- 1 root root 5648 Feb 26 16:17 /usr/local/man/man3/Config::Any::INI.3pm
-r--r--r-- 1 root root 5120 Feb 26 16:17 /usr/local/man/man3/Config::Any::JSON.3pm
-r--r--r-- 1 root root 4847 Feb 26 16:17 /usr/local/man/man3/Config::Any::Perl.3pm
-r--r--r-- 1 root root 5442 Feb 26 16:17 /usr/local/man/man3/Config::Any::XML.3pm
-r--r--r-- 1 root root 5006 Feb 26 16:17 /usr/local/man/man3/Config::Any::YAML.3pm
-r--r--r-- 1 root root 1844 Aug 15 2013 /usr/local/share/perl/5.14.2/Config/Any/Base.pm
-r--r--r-- 1 root root 1596 Sep 10 22:41 /usr/local/share/perl/5.14.2/Config/Any/General.pm
-r--r--r-- 1 root root 2227 Sep 10 22:41 /usr/local/share/perl/5.14.2/Config/Any/INI.pm
-r--r--r-- 1 root root 2142 Sep 10 22:41 /usr/local/share/perl/5.14.2/Config/Any/JSON.pm
-r--r--r-- 1 root root 1133 Sep 10 22:41 /usr/local/share/perl/5.14.2/Config/Any/Perl.pm
-r--r--r-- 1 root root 12325 Sep 10 22:41 /usr/local/share/perl/5.14.2/Config/Any.pm
-r--r--r-- 1 root root 2285 Sep 10 22:41 /usr/local/share/perl/5.14.2/Config/Any/XML.pm
-r--r--r-- 1 root root 1582 Sep 10 22:41 /usr/local/share/perl/5.14.2/Config/Any/YAML.pm

$ find ./fatlib/
./fatlib/
./fatlib/Convert
./fatlib/Convert/UU.pm

Turns out that fatpacker does not pack stuffs which has been installed as root or another user, the packages needs to exist in YOUR cpan directory.
So obviously we can’t uninstall from cpan so easily, what do we do?

Here’s what YOU NEED TO DO:

selven@bousouliki.com$cpan
cpan > force install Config::Any
cpan > q

selven@bousouliki.com$ fatpack pack whatever.pl >whateverFAT.pl

🙂 You are good to go!

+selven