Rex-Apache-Deploy

 view release on metacpan or  search on metacpan

lib/Rex/Apache/Build.pm  view on Meta::CPAN

  $APP_VERSION = sub {

    unless ( -f $file ) {
      Rex::Logger::info( "Version file not found ($file). Current Path: "
          . getcwd()
          . ". Using current time." );
      return "" . time;
    }

    my ($version) =
      grep { $_ = $1 if $_ =~ $regex; } eval { local (@ARGV) = ($file); <>; };

    return $version;

  };
}

sub get_version {
  return &$APP_VERSION();
}

lib/Rex/Apache/Build/deb.pm  view on Meta::CPAN

      content => join("\n", @{ $self->{config_files} });
  }
}

sub create_scripts {
  my ($self) = @_;

  if($self->{post_install}) {
    my $post_install = $self->{post_install};
    if($post_install !~ m/\n/sim && -f $post_install) {
      $post_install = eval { local(@ARGV, $/) = ($post_install); <>; };
    }

    file "temp-deb-build/control/postinst",
      content => $post_install,
      mode   => 755;
  }

  if($self->{pre_install}) {
    my $pre_install = $self->{pre_install};
    if($pre_install !~ m/\n/sim && -f $pre_install) {
      $pre_install = eval { local(@ARGV, $/) = ($pre_install); <>; };
    }

    file "temp-deb-build/control/preinst",
      content => $pre_install,
      mode   => 755;
  }

  if($self->{post_uninstall}) {
    my $post_uninstall = $self->{post_uninstall};
    if($post_uninstall !~ m/\n/sim && -f $post_uninstall) {
      $post_uninstall = eval { local(@ARGV, $/) = ($post_uninstall); <>; };
    }

    file "temp-deb-build/control/postrm",
      content => $post_uninstall,
      mode   => 755;
  }

  if($self->{pre_uninstall}) {
    my $pre_uninstall = $self->{pre_uninstall};
    if($pre_uninstall !~ m/\n/sim && -f $pre_uninstall) {
      $pre_uninstall = eval { local(@ARGV, $/) = ($pre_uninstall); <>; };
    }

    file "temp-deb-build/control/prerm",
      content => $pre_uninstall,
      mode   => 755;
  }

}

sub package_data {



( run in 0.523 second using v1.01-cache-2.11-cpan-49f99fa48dc )