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

I am using App::Fatpacker to try to bundle all my modules into my script to deploy to multiple UNIX servers.

I am running

$ fatpack trace myscript.pl $ fatpack packlists-for `cat fatpacker.trace` >packlists $ fatpack tree `cat packlists` $ (fatpack file; cat myscript.pl) >myscript.packed.pl

and my fatpacker.trace is

IO/Handle.pm Sys/Info/Constants.pm Time/tm.pm POSIX.pm List/Util.pm SelectSaver.pm /usr/lib/perl5/site_perl/5.8.8/auto/Linux/MemInfo/autosplit.ix IO/Socket.pm Fcntl.pm Symbol.pm Number/Bytes/Human.pm Scalar/Util.pm IO/Socket/INET.pm Parse/DMIDecode/Constants.pm Parse/DMIDecode.pm Errno.pm File/Spec.pm Sys/Info/Base.pm Time/localtime.pm warnings/register.pm Net/Address/IP/Local.pm Net/Config.pm Parse/DMIDecode/Handle.pm Linux/MemInfo.pm Error/Simple.pm IO/Seekable.pm Error.pm version.pm base.pm XML/Writer.pm Config.pm IO.pm IO/Socket/UNIX.pm bytes.pm Class/Struct.pm version/vxs.pm Sys/Info.pm File/Spec/Unix.pm Exporter/Heavy.pm vars.pm constant.pm Net/Domain.pm Socket.pm /usr/lib/perl5/5.8.8/Net/libnet.cfg AutoLoader.pm overload.pm IO/File.pm /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/POSIX/autosplit.ix DynaLoader.pm Data/Dumper.pm

The error I receive when I execute the last command is

Can't locate Perl/Version.pm in @INC (@INC contains: CODE(0x8931f20) / +usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/ +site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5 +.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/li +b/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr +/lib/perl5/5.8.8 .) at myscript.packed.pl line 17011. BEGIN failed--compilation aborted at myscript.packed.pl line 17011.

I really want to get this working and deployed. I don't understand why version.pm can't be located???

Replies are listed 'Best First'.
Re: App::Fatpacker giving me a version.pm error
by tobyink (Canon) on Dec 14, 2012 at 16:45 UTC

    Perl/Version.pm and version.pm are two different file names.

    version is pre-installed with Perl 5.9.0 and above (but not 5.8.8); Perl::Version is a CPAN module.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
      Oh I see, that was very confusing to me but I see the error. I am receiving a Can't locate version.pm in @INC when I run my script on the server. It seems my dev server has a newer version.

      Do you know if I can have FatPacker pick up version.pm to package it in my script?