Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom modules to perl carton?

Tags:

perl

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.

like image 915
user1190411 Avatar asked Nov 12 '13 08:11

user1190411


1 Answers

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.

like image 50
user1190411 Avatar answered Oct 12 '22 04:10

user1190411