Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created January 14, 2015 23:04
Show Gist options
  • Save miyagawa/6788a0516521f57841ca to your computer and use it in GitHub Desktop.
Save miyagawa/6788a0516521f57841ca to your computer and use it in GitHub Desktop.
➜ cat cpanfile
requires 'Catalyst';
➜ carmel install
Successfully installed Safe-Isa-1.000005
Successfully installed File-ShareDir-Install-0.10
Successfully installed CPAN-Meta-2.143240 (upgraded from 2.140640)
...
Successfully installed Catalyst-Runtime-5.90082
102 distributions installed
➜ carmel list
Catalyst (5.90082) in /Users/miyagawa/.cpanm/builds/Catalyst-Runtime-5.90082
CGI::Simple::Cookie (1.114) in /Users/miyagawa/.cpanm/builds/CGI-Simple-1.115
CGI::Struct (1.21) in /Users/miyagawa/.cpanm/builds/CGI-Struct-1.21
Class::C3::Adopt::NEXT (0.13) in /Users/miyagawa/.cpanm/builds/Class-C3-Adopt-NEXT-0.13
Class::Data::Inheritable (0.08) in /Users/miyagawa/.cpanm/builds/Class-Data-Inheritable-0.08
...
Sub::Uplevel (0.24) in /Users/miyagawa/.cpanm/builds/Sub-Uplevel-0.24
Test::SharedFork (0.29) in /Users/miyagawa/.cpanm/builds/Test-SharedFork-0.29
Variable::Magic (0.55) in /Users/miyagawa/.cpanm/builds/Variable-Magic-0.55
➜ carmel env
PATH=/Users/miyagawa/.cpanm/builds/Catalyst-Runtime-5.90082/blib/script:/Users/miyagawa/.cpanm/builds/Catalyst-Runtime-5.90082/blib/bin:...
PERL5LIB=/Users/miyagawa/.cpanm/builds/Catalyst-Runtime-5.90082/blib/arch:/Users/miyagawa/.cpanm/builds/Catalyst-Runtime-5.90082/blib/lib:...
➜ carmel exec perl -e 'warn scalar @INC'
191 at -e line 1.
➜ carmel exec perl -e 'use Catalyst; warn $INC{"Catalyst.pm"}'
/Users/miyagawa/.cpanm/builds/Catalyst-Runtime-5.90082/blib/lib/Catalyst.pm at -e line 1.
➜ carmel exec perl -e 'use Catalyst; use Data::Dumper; print Dumper \%INC'
$VAR1 = {
'Params/Util.pm' => '/Users/miyagawa/.cpanm/builds/Params-Util-1.07/blib/lib/Params/Util.pm',
'MooseX/Emulate/Class/Accessor/Fast/Meta/Accessor.pm' => '/Users/miyagawa/.cpanm/builds/MooseX-Emulate-Class-Accessor-Fast-0.00903/blib/lib/MooseX/Emulate/Class/Accessor/Fast/Meta/Accessor.pm',
'Catalyst/Request/Upload.pm' => '/Users/miyagawa/.cpanm/builds/Catalyst-Runtime-5.90082/blib/lib/Catalyst/Request/Upload.pm',
'Class/MOP/Mixin/HasAttributes.pm' => '/Users/miyagawa/.cpanm/builds/Moose-2.1403/blib/lib/Class/MOP/Mixin/HasAttributes.pm',
'Module/Pluggable/Object.pm' => '/Users/miyagawa/.cpanm/builds/Module-Pluggable-5.1/blib/lib/Module/Pluggable/Object.pm',
'Class/Load.pm' => '/Users/miyagawa/.cpanm/builds/Class-Load-0.22/blib/lib/Class/Load.pm',
'metaclass.pm' => '/Users/miyagawa/.cpanm/builds/Moose-2.1403/blib/lib/metaclass.pm',
'URI/QueryParam.pm' => '/Users/miyagawa/.cpanm/builds/URI-1.65/blib/lib/URI/QueryParam.pm',
'Moose/Meta/Role/Application/ToInstance.pm' => '/Users/miyagawa/.cpanm/builds/Moose-2.1403/blib/lib/Moose/Meta/Role/Application/ToInstance.pm',
're.pm' => '/Users/miyagawa/.plenv/versions/5.20.1/lib/perl5/5.20.1/darwin-2level/re.pm',
'Class/MOP/Class/Immutable/Moose/Meta/Class.pm' => '(set by Moose)',
'Tree/Simple/Visitor/FindByUID.pm' => '/Users/miyagawa/.cpanm/builds/Tree-Simple-VisitorFactory-0.12/blib/lib/Tree/Simple/Visitor/FindByUID.pm',
'Carp/Clan.pm' => '/Users/miyagawa/.cpanm/builds/Carp-Clan-6.04/blib/lib/Carp/Clan.pm',
'Class/MOP/Class/Immutable/Moose/Meta/Class/__ANON__/SERIAL/1.pm' => '(set by Moose)',
'FileHandle.pm' => '/Users/miyagawa/.plenv/versions/5.20.1/lib/perl5/5.20.1/FileHandle.pm',
...
➜ time carmel exec perl -e 1
carmel exec perl -e 1 0.45s user 0.06s system 96% cpu 0.525 total
@redhotpenguin
Copy link

Works for Moose also!

fmoyer@bigfoot ~ $ cat cpanfile
requires 'Moose';
fmoyer@bigfoot ~ $ carmel install
--> Working on .
Configuring /Users/fmoyer ... OK
==> Found dependencies: Moose
--> Working on Moose
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/E/ET/ETHER/Moose-2.1403.tar.gz ... OK
==> Found dependencies: Dist::CheckConflicts
--> Working on Dist::CheckConflicts
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DO/DOY/Dist-CheckConflicts-0.11.tar.gz ... OK
Configuring Dist-CheckConflicts-0.11 ... OK
==> Found dependencies: Module::Runtime
--> Working on Module::Runtime
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/Z/ZE/ZEFRAM/Module-Runtime-0.014.tar.gz ... OK
==> Found dependencies: Module::Build
--> Working on Module::Build
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/L/LE/LEONT/Module-Build-0.4210.tar.gz ... OK
==> Found dependencies: CPAN::Meta
--> Working on CPAN::Meta
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DA/DAGOLDEN/CPAN-Meta-2.143240.tar.gz ... OK
Configuring CPAN-Meta-2.143240 ... OK
Building CPAN-Meta-2.143240 ... OK
Successfully installed CPAN-Meta-2.143240 (upgraded from 2.140640)
Configuring Module-Build-0.4210 ... OK
Building Module-Build-0.4210 ... OK
Successfully installed Module-Build-0.4210 (upgraded from 0.4205)
Configuring Module-Runtime-0.014 ... OK
Building Module-Runtime-0.014 ... OK
Successfully installed Module-Runtime-0.014
Building Dist-CheckConflicts-0.11 ... OK
Successfully installed Dist-CheckConflicts-0.11
Configuring Moose-2.1403 ... OK
==> Found dependencies: Package::Stash::XS, List::MoreUtils, Task::Weaken, Package::Stash, Data::OptList, Sub::Exporter, Package::DeprecationManager, Params::Util, MRO::Compat, Devel::GlobalDestruction, Module::Runtime::Conflicts, Try::Tiny, Sub::Name, Devel::StackTrace, Eval::Closure, Class::Load, Devel::OverloadInfo, Class::Load::XS
--> Working on Package::Stash::XS
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DO/DOY/Package-Stash-XS-0.28.tar.gz ... OK
Configuring Package-Stash-XS-0.28 ... OK
Building Package-Stash-XS-0.28 ... OK
Successfully installed Package-Stash-XS-0.28
--> Working on List::MoreUtils
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/R/RE/REHSACK/List-MoreUtils-0.401.tar.gz ... OK
Configuring List-MoreUtils-0.401 ... OK
==> Found dependencies: Exporter::Tiny
--> Working on Exporter::Tiny
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/T/TO/TOBYINK/Exporter-Tiny-0.042.tar.gz ... OK
Configuring Exporter-Tiny-0.042 ... OK
Building Exporter-Tiny-0.042 ... OK
Successfully installed Exporter-Tiny-0.042
Building List-MoreUtils-0.401 ... OK
Successfully installed List-MoreUtils-0.401
--> Working on Task::Weaken
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/A/AD/ADAMK/Task-Weaken-1.04.tar.gz ... OK
Configuring Task-Weaken-1.04 ... OK
Building Task-Weaken-1.04 ... OK
Successfully installed Task-Weaken-1.04
--> Working on Package::Stash
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DO/DOY/Package-Stash-0.37.tar.gz ... OK
Configuring Package-Stash-0.37 ... OK
==> Found dependencies: Module::Implementation
--> Working on Module::Implementation
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DR/DROLSKY/Module-Implementation-0.09.tar.gz ... OK
Configuring Module-Implementation-0.09 ... OK
==> Found dependencies: Try::Tiny
--> Working on Try::Tiny
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.22.tar.gz ... OK
Configuring Try-Tiny-0.22 ... OK
Building Try-Tiny-0.22 ... OK
Successfully installed Try-Tiny-0.22
Building Module-Implementation-0.09 ... OK
Successfully installed Module-Implementation-0.09
Building Package-Stash-0.37 ... OK
Successfully installed Package-Stash-0.37
--> Working on Data::OptList
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/R/RJ/RJBS/Data-OptList-0.109.tar.gz ... OK
Configuring Data-OptList-0.109 ... OK
==> Found dependencies: Params::Util, Sub::Install
--> Working on Params::Util
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/A/AD/ADAMK/Params-Util-1.07.tar.gz ... OK
Configuring Params-Util-1.07 ... OK
Building Params-Util-1.07 ... OK
Successfully installed Params-Util-1.07
--> Working on Sub::Install
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/R/RJ/RJBS/Sub-Install-0.928.tar.gz ... OK
Configuring Sub-Install-0.928 ... OK
Building Sub-Install-0.928 ... OK
Successfully installed Sub-Install-0.928
Building Data-OptList-0.109 ... OK
Successfully installed Data-OptList-0.109
--> Working on Sub::Exporter
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/R/RJ/RJBS/Sub-Exporter-0.987.tar.gz ... OK
Configuring Sub-Exporter-0.987 ... OK
Building Sub-Exporter-0.987 ... OK
Successfully installed Sub-Exporter-0.987
--> Working on Package::DeprecationManager
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DR/DROLSKY/Package-DeprecationManager-0.13.tar.gz ... OK
Configuring Package-DeprecationManager-0.13 ... OK
==> Found dependencies: Test::Fatal, Test::Requires
--> Working on Test::Fatal
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/R/RJ/RJBS/Test-Fatal-0.014.tar.gz ... OK
Configuring Test-Fatal-0.014 ... OK
Building Test-Fatal-0.014 ... OK
Successfully installed Test-Fatal-0.014
--> Working on Test::Requires
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/T/TO/TOKUHIROM/Test-Requires-0.08.tar.gz ... OK
Configuring Test-Requires-0.08 ... OK
Building Test-Requires-0.08 ... OK
Successfully installed Test-Requires-0.08
Building Package-DeprecationManager-0.13 ... OK
Successfully installed Package-DeprecationManager-0.13
--> Working on MRO::Compat
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/B/BO/BOBTFISH/MRO-Compat-0.12.tar.gz ... OK
Configuring MRO-Compat-0.12 ... OK
Building MRO-Compat-0.12 ... OK
Successfully installed MRO-Compat-0.12
--> Working on Devel::GlobalDestruction
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/H/HA/HAARG/Devel-GlobalDestruction-0.13.tar.gz ... OK
Configuring Devel-GlobalDestruction-0.13 ... OK
==> Found dependencies: Sub::Exporter::Progressive
--> Working on Sub::Exporter::Progressive
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/F/FR/FREW/Sub-Exporter-Progressive-0.001011.tar.gz ... OK
Configuring Sub-Exporter-Progressive-0.001011 ... OK
Building Sub-Exporter-Progressive-0.001011 ... OK
Successfully installed Sub-Exporter-Progressive-0.001011
Building Devel-GlobalDestruction-0.13 ... OK
Successfully installed Devel-GlobalDestruction-0.13
--> Working on Module::Runtime::Conflicts
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/E/ET/ETHER/Module-Runtime-Conflicts-0.001.tar.gz ... OK
==> Found dependencies: Module::Build::Tiny
--> Working on Module::Build::Tiny
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/L/LE/LEONT/Module-Build-Tiny-0.039.tar.gz ... OK
==> Found dependencies: ExtUtils::InstallPaths, ExtUtils::Helpers, ExtUtils::Config
--> Working on ExtUtils::InstallPaths
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.010.tar.gz ... OK
Configuring ExtUtils-InstallPaths-0.010 ... OK
==> Found dependencies: ExtUtils::Config
--> Working on ExtUtils::Config
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/L/LE/LEONT/ExtUtils-Config-0.008.tar.gz ... OK
Configuring ExtUtils-Config-0.008 ... OK
Building ExtUtils-Config-0.008 ... OK
Successfully installed ExtUtils-Config-0.008
Building ExtUtils-InstallPaths-0.010 ... OK
Successfully installed ExtUtils-InstallPaths-0.010
--> Working on ExtUtils::Helpers
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.022.tar.gz ... OK
Configuring ExtUtils-Helpers-0.022 ... OK
Building ExtUtils-Helpers-0.022 ... OK
Successfully installed ExtUtils-Helpers-0.022
Configuring Module-Build-Tiny-0.039 ... OK
Building Module-Build-Tiny-0.039 ... OK
Successfully installed Module-Build-Tiny-0.039
Configuring Module-Runtime-Conflicts-0.001 ... OK
Building Module-Runtime-Conflicts-0.001 ... OK
Successfully installed Module-Runtime-Conflicts-0.001
--> Working on Sub::Name
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/E/ET/ETHER/Sub-Name-0.12.tar.gz ... OK
Configuring Sub-Name-0.12 ... OK
Building Sub-Name-0.12 ... OK
Successfully installed Sub-Name-0.12
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DR/DROLSKY/Devel-StackTrace-2.00.tar.gz ... OK
Configuring Devel-StackTrace-2.00 ... OK
Building Devel-StackTrace-2.00 ... OK
Successfully installed Devel-StackTrace-2.00
--> Working on Eval::Closure
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/D/DO/DOY/Eval-Closure-0.11.tar.gz ... OK
Configuring Eval-Closure-0.11 ... OK
Building Eval-Closure-0.11 ... OK
Successfully installed Eval-Closure-0.11
--> Working on Class::Load
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/E/ET/ETHER/Class-Load-0.22.tar.gz ... OK
Configuring Class-Load-0.22 ... OK
==> Found dependencies: namespace::clean
--> Working on namespace::clean
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/R/RI/RIBASUSHI/namespace-clean-0.25.tar.gz ... OK
Configuring namespace-clean-0.25 ... OK
==> Found dependencies: B::Hooks::EndOfScope
--> Working on B::Hooks::EndOfScope
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/E/ET/ETHER/B-Hooks-EndOfScope-0.13.tar.gz ... OK
Configuring B-Hooks-EndOfScope-0.13 ... OK
==> Found dependencies: Variable::Magic
--> Working on Variable::Magic
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/V/VP/VPIT/Variable-Magic-0.55.tar.gz ... OK
Configuring Variable-Magic-0.55 ... OK
Building Variable-Magic-0.55 ... OK
Successfully installed Variable-Magic-0.55
Building B-Hooks-EndOfScope-0.13 ... OK
Successfully installed B-Hooks-EndOfScope-0.13
Building namespace-clean-0.25 ... OK
Successfully installed namespace-clean-0.25
Building Class-Load-0.22 ... OK
Successfully installed Class-Load-0.22
--> Working on Devel::OverloadInfo
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/I/IL/ILMARI/Devel-OverloadInfo-0.002.tar.gz ... OK
Configuring Devel-OverloadInfo-0.002 ... OK
==> Found dependencies: Sub::Identify
--> Working on Sub::Identify
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/R/RG/RGARCIA/Sub-Identify-0.08.tar.gz ... OK
Configuring Sub-Identify-0.08 ... OK
Building Sub-Identify-0.08 ... OK
Successfully installed Sub-Identify-0.08
Building Devel-OverloadInfo-0.002 ... OK
Successfully installed Devel-OverloadInfo-0.002
--> Working on Class::Load::XS
Fetching http://ftp.osuosl.org/pub/CPAN/authors/id/E/ET/ETHER/Class-Load-XS-0.09.tar.gz ... OK
Configuring Class-Load-XS-0.09 ... OK
Building Class-Load-XS-0.09 ... OK
Successfully installed Class-Load-XS-0.09
Building Moose-2.1403 ... OK
Successfully installed Moose-2.1403
<== Installed dependencies for .. Finishing.
37 distributions installed

@redhotpenguin
Copy link

Got this though:
carmel env
Could not find an artifact for Moose => 0 at /Users/fmoyer/perl5/perlbrew/perls/perl-5.20.1/bin/carmel line 5.
(infinite loop)

@miyagawa
Copy link
Author

you need a patched cpanm. carmel install is just a wrapper for cpanm --installdeps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment