App-FatPacker

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.009012 - 2013-01-18
  - support for < 5.8 perls (RT#57811, haarg)

0.009011 - 2012-09-24
  - RT #79835: install bin/fatpack (lost in 0.009009 in the
    Module::Install -> Distar conversion)

0.009010 - 2012-09-19
  - enable temp file deletion in pack.t on Win32
  - RT #79489: %fatpacked keys need to be unix paths

0.009009 - 2012-08-03
  - RT #78724: fix trace --to-stderr (ether)

0.009008 - 2012-07-16
  - RT #78391: Avoid using $_ when requiring modules

0.009007 - 2012-07-12
  - Allow capturing of trace information into return value
  - Add repsoitory metadata to META.YML

META.json  view on Meta::CPAN

         }
      },
      "runtime" : {
         "requires" : {
            "B" : "1.01",
            "Cwd" : "0",
            "File::Copy" : "0",
            "File::Find" : "0",
            "File::Path" : "0",
            "File::Spec::Functions" : "0",
            "File::Spec::Unix" : "0",
            "Getopt::Long" : "0",
            "perl" : "5.008000"
         }
      },
      "test" : {
         "requires" : {
            "File::Basename" : "0",
            "File::Spec" : "0",
            "File::Temp" : "0",
            "Test::More" : "0.82"

META.yml  view on Meta::CPAN

  directory:
    - t
    - inc
requires:
  B: '1.01'
  Cwd: '0'
  File::Copy: '0'
  File::Find: '0'
  File::Path: '0'
  File::Spec::Functions: '0'
  File::Spec::Unix: '0'
  Getopt::Long: '0'
  perl: '5.008000'
resources:
  bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=App-FatPacker
  repository: git://git.shadowcat.co.uk/p5sagit/App-FatPacker.git
version: '0.010008'
x_serialization_backend: 'CPAN::Meta::YAML version 0.012'

Makefile.PL  view on Meta::CPAN

      runtime => {
        requires => {
          # B::perlstring was added in B 1.01 (perl 5.8.0)
          perl => '5.008000',
          'B' => '1.01',
          'Cwd' => '0',
          'File::Copy' => '0',
          'File::Find' => '0',
          'File::Path' => '0',
          'File::Spec::Functions' => '0',
          'File::Spec::Unix' => '0',
          'Getopt::Long' => '0',
        },
      },
      test => {
        requires => {
          'File::Basename' => '0',
          'File::Spec' => '0',
          'File::Temp' => '0',
          'Test::More' => '0.82',
        },

lib/App/FatPacker.pm  view on Meta::CPAN


use strict;
use warnings FATAL => 'all';
use 5.008001;
use Getopt::Long;
use Cwd qw(cwd);
use File::Find qw(find);
use File::Spec::Functions qw(
  catdir splitpath splitdir catpath rel2abs abs2rel
);
use File::Spec::Unix;
use File::Copy qw(copy);
use File::Path qw(mkpath rmtree);
use B qw(perlstring);

our $VERSION = '0.010008'; # v0.10.8

$VERSION = eval $VERSION;

sub call_parser {
  my $self = shift;

lib/App/FatPacker.pm  view on Meta::CPAN

  my ($self) = @_;
  my $cwd = cwd;
  return grep -d, map rel2abs($_, $cwd), ('lib','fatlib');
}

sub collect_files {
  my ($self, $dir, $files) = @_;
  find(sub {
    return unless -f $_;
    !/\.pm$/ and warn "File ${File::Find::name} isn't a .pm file - can't pack this -- if you hoped we were going to, things may not be what you expected later\n" and return;
    $files->{File::Spec::Unix->abs2rel($File::Find::name,$dir)} =
      $self->load_file($File::Find::name);
  }, $dir);
}

sub load_main_script {
  my ($self, $file) = @_;
  open my $fh, "<", $file or die("Can't read $file: $!");
  my $shebang = <$fh>;
  my $script = join "", <$fh>;
  close $fh;



( run in 0.830 second using v1.01-cache-2.11-cpan-64ef6c95b5d )