X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FFatPacker.pm;h=d008cbbb4103db03b116ba78a7a91d98b1de2b94;hb=64941bce7d7ab9c4e1e6149f3ba15960def740b5;hp=cfa2db80aec9d7b0d95fcc7247f3dfc5ce67b2c7;hpb=9fecf34853eb73b3f1f37ebc0af4b9a541650ba7;p=p5sagit%2FApp-FatPacker.git diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index cfa2db8..d008cbb 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -14,7 +14,7 @@ use File::Copy qw(copy); use File::Path qw(mkpath rmtree); use B qw(perlstring); -our $VERSION = '0.010005'; # 0.10.5 +our $VERSION = '0.010007'; # 0.10.7 $VERSION = eval $VERSION; @@ -142,11 +142,16 @@ sub script_command_packlists_for { sub packlists_containing { my ($self, $targets) = @_; - my @targets = @$targets; + my @targets; { local @INC = ('lib', @INC); - foreach my $t (@targets) { - require $t; + foreach my $t (@$targets) { + unless (eval { require $t; 1}) { + warn "Failed to load ${t}: $@\n" + ."Make sure you're not missing a packlist as a result\n"; + next; + } + push @targets, $t; } } my @search = grep -d $_, map catdir($_, 'auto'), @INC; @@ -341,15 +346,32 @@ Or, with more step-by-step control: $ fatpack tree `cat packlists` $ fatpack file myscript.pl >myscript.packed.pl -See the documentation for the L script itself for more information. +Each command is designed to be simple and self-contained so that you can modify +the input/output of each step as needed. See the documentation for the +L script itself for more information. The programmatic API for this code is not yet fully decided, hence the 0.x release version. Expect that to be cleaned up for 1.0. +=head1 CAVEATS + +As dependency module code is copied into the resulting file as text, only +pure-perl dependencies can be packed, not compiled XS code. + +The currently-installed dependencies to pack are found via F<.packlist> files, +which are generally only included in non-core distributions that were installed +by a CPAN installer. This is a feature; see L for +details. (a notable exception to this is FreeBSD, which, since its packaging +system is designed to work equivalently to a source install, does preserve +the packlist files) + =head1 SEE ALSO L
+L - PAR Packager, a much more complex architecture-dependent packer that +can pack compiled code and even a Perl interpreter + =head1 SUPPORT Bugs may be submitted through L @@ -383,7 +405,9 @@ dolmen - Olivier Mengué (cpan:DOLMEN) djerius - Diab Jerius (cpan:DJERIUS) -haarg - Graham Knop (cpan:HAARG> +haarg - Graham Knop (cpan:HAARG) + +grinnz - Dan Book (cpan:DBOOK) Many more people are probably owed thanks for ideas. Yet another doc nit to fix.