summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiko Miyagawa <miyagawa@bulknews.net>2015-05-08 16:16:45 -0700
committerTatsuhiko Miyagawa <miyagawa@bulknews.net>2015-05-08 16:17:24 -0700
commit206fe9c32db17c1d9bb8f86c3b00971e20237918 (patch)
tree92bc1cc90100f702f890ff6abe6a4ea9c216b6e3
parent579f2a52c7ea9dc3161884679382d408e9ff0b35 (diff)
downloadcarton-206fe9c32db17c1d9bb8f86c3b00971e20237918.tar.gz
move carton fatpack into its own command.
-rw-r--r--Changes2
-rw-r--r--lib/Carton/CLI.pm19
-rw-r--r--lib/Carton/Doc/Bundle.pod11
-rw-r--r--lib/Carton/Doc/Fatpack.pod15
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>.
+