Jed Cunningham - Thousand Oaks Perl Mongers
June 15, 2016
Perl module dependency manager
Use DateTime 1.17 from 2015
requires 'DateTime', '==1.17';
carton install
ls -l
vim cpanfile.snapshot
Simple script (ex.pl)
#!/usr/bin/env perl
use warnings;
use strict;
use DateTime;
use v5.24;
say $DateTime::VERSION;
Lets run it
chmod +x ex.pl
carton exec ./ex.pl
perl -Ilocal/lib/perl5 ex.pl
Ready for deployment?
Push code somewhere (minus local :)
carton install --deployment
What about bundling? (Don't want to hit cpan when deploying)
carton bundle
Bundles the necessary tarballs into vendor/cache
Install from bundled tarballs
carton install --cached (--deployment)
Using both --cached and --deployment, you wont hit cpan
Alternatives
opinionated CPAN module authoring tool
Assumes your module(s):
Benefits
Cons
Alternatives
Demo