I'm trying to use carton as deployment container. But I ran into a small problem. I don't know, how to install private modules.
Created a quick test module:
h2xs -AX Foo::Bar
tree Foo-Bar/
Foo-Bar/
├── Changes
├── lib
│ └── Foo
│ └── Bar.pm
├── Makefile.PL
├── MANIFEST
├── README
└── t
└── Foo-Bar.t
Packaged it: tar cvfz Foo-Bar-0.01.tar.gz Foo-Bar/
Copied the package to vendor/cache
directory.
ls vendor/cache/
Foo-Bar-0.01.tar.gz Try-Tiny-0.18.tar.gz
cat cpanfile
requires 'Foo::Bar', '0.01';
requires 'Try::Tiny', '0.18';
carton install --cached
Installing modules using /home/donpedro/Garbage/Carton/cpanfile
! Couldn't find module or a distribution Foo::Bar (0.01)
Successfully installed Try-Tiny-0.18
! Installing the dependencies failed: Module 'Foo::Bar' is not installed
! Bailing out the installation for /home/donpedro/Garbage/Carton/.
1 distribution installed
Installing modules failed
Tried a Milla default module also(tutorial example, milla new Dist-Name), but no results. Documentation mentions that for DarkPan modules, just drop the module into the vendor/cache directory, which I'm trying to do. Official CPAN modules can be just dropped into the vendor/cache directory.
What to try next or how to solve my problem? :)
Edit:
miyagawa and lejeunerenard in the carton IRC channel gave me this information:
For this to work at the moment, one needs Carton 1.1 (current stable 1.0) and new cpanfile dev version. cpanfile has the new option
-dist => '/path/to/Foo-Bar.tar.gz' argument for the requires method
As I'm too lazy to be early adopter, I will go with Carton for CPAN bundles and cpanm for private bundles.
Thanks miyagawa and lejeunerenard.
miyagawa and lejeunerenard in the carton IRC channel gave me this information: For this to work at the moment, one needs Carton 1.1 (current stable 1.0) and new cpanfile dev version. cpanfile has the new option -dist => '/path/to/Foo-Bar.tar.gz' argument for the requires method
As of now(28.12) there is still no Carton version bump and git 1.1 branch is 3 months old. So things take a bit time. Pinto seems to be under active development at the moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With