[carton] 460/472: move carton fatpack into its own command.

Lucas Kanashiro kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:39:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

kanashiro-guest pushed a commit to branch master
in repository carton.

commit 206fe9c32db17c1d9bb8f86c3b00971e20237918
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date:   Fri May 8 16:16:45 2015 -0700

    move carton fatpack into its own command.
---
 Changes                    |  2 ++
 lib/Carton/CLI.pm          | 19 ++++++++-----------
 lib/Carton/Doc/Bundle.pod  | 11 ++---------
 lib/Carton/Doc/Fatpack.pod | 15 +++++++++++++++
 4 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/Changes b/Changes
index 2bb6c97..e573597 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
 Revision history for carton
 
 {{$NEXT}}
+        - Disable fatpack generation in carton bundle by default. Use the new standalone
+          command carton fatpack, to generate vendor/bin/carton
 
 v1.0.19  2015-05-01 17:48:06 PDT
         - Remove Module::Build and MakeMaker from prerequisite since cpanm will
diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm
index a419518..b990ad2 100644
--- a/lib/Carton/CLI.pm
+++ b/lib/Carton/CLI.pm
@@ -145,12 +145,6 @@ sub cmd_version {
 sub cmd_bundle {
     my($self, @args) = @_;
 
-    my $fatpack = 1;
-    $self->parse_options(
-        \@args,
-        "fatpack!" => \$fatpack,
-    );
-
     my $env = Carton::Environment->build;
     $env->snapshot->load;
 
@@ -162,14 +156,17 @@ sub cmd_bundle {
     );
     $builder->bundle($env->install_path, $env->vendor_cache, $env->snapshot);
 
-    if ($fatpack) {
-        require Carton::Packer;
-        Carton::Packer->new->fatpack_carton($env->vendor_bin);
-    }
-
     $self->printf("Complete! Modules were bundled into %s\n", $env->vendor_cache, SUCCESS);
 }
 
+sub cmd_fatpack {
+    my($self, @args) = @_;
+
+    my $env = Carton::Environment->build;
+    require Carton::Packer;
+    Carton::Packer->new->fatpack_carton($env->vendor_bin);
+}
+
 sub cmd_install {
     my($self, @args) = @_;
 
diff --git a/lib/Carton/Doc/Bundle.pod b/lib/Carton/Doc/Bundle.pod
index 834338f..68ce8cc 100644
--- a/lib/Carton/Doc/Bundle.pod
+++ b/lib/Carton/Doc/Bundle.pod
@@ -16,12 +16,5 @@ Bundled modules can be committed to a version control system, or
 transferred to another host with scp/rsync etc. to use with C<carton
 install --cached>.
 
-=head1 OPTIONS
-
-=over 4
-
-=item --no-fatpack
-
-Skip generating fatpacked C<carton> executable in C<vendor/bin>.
-
-=back
+See also C<carton fatpack> that generates C<carton> executable in
+C<vendor/bin>.
diff --git a/lib/Carton/Doc/Fatpack.pod b/lib/Carton/Doc/Fatpack.pod
new file mode 100644
index 0000000..15282e0
--- /dev/null
+++ b/lib/Carton/Doc/Fatpack.pod
@@ -0,0 +1,15 @@
+=head1 NAME
+
+Carton::Doc::Fatpack - Fatpack carton executable into vendor/bin
+
+=head1 SYNOPSIS
+
+  carton fatpack
+
+=head1 DESCRIPTION
+
+This command creates a fatpack executable of C<carton> in
+C<vendor/bin> directory, so that it can be used to bootstrap
+deployment process, combined with C<carton bundle> and C<carton
+install --cached>.
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git



More information about the Pkg-perl-cvs-commits mailing list