2

I am trying to write an Juju formula for App::Alice, a web based IRC client.

According to the the installation instructions I execute the following commands to snag Alice and all of it's dependencies from CPAN:

curl -L http://xrl.us/cpanm | perl - --sudo App::cpanminus
cpanm --sudo --installdeps App::Alice

I wrote the formula to do this so when it launches an EC2 instance it installs the entire thing, here's my install hook:

#!/bin/bash
DEBIAN_FRONTEND=noninteractive sudo apt-get -y install build-essential libnet-ssleay-perl
set -eux # -x for verbose logging to juj debug-log
curl -L http://xrl.us/cpanm | perl - --sudo App::cpanminus
cpanm --sudo --installdeps App::Alice

The problem is that it took about 10 minutes on an m1.small to snag and build everything from CPAN. This is too long to wait, especially if I'm going to pay for 10 minutes of computing time every time I want to run Alice! So I was thinking if I could install the CPAN modules that already exist as packages and add it to the apt-get line that this would save a bunch of time.

Right away I got an error when using Alice that it needed SSL, so I added the libnet-ssleay-perl package to the right line.

My problem is that I don't want to run the install and manually determine which modules it needs, search for it in the archive, and then add it.

Is there a tool or method that will just enable me to figure out which modules Alice needs that are packaged so I can install those from the archive or do I need to go search for each one?

1 Answer 1

2

I looked in Makefile.PL and found this:

all_from 'lib/Alice.pm';
requires 'List::MoreUtils' => '0';
requires 'Any::Moose' => '0';
requires 'Try::Tiny' => '0';
requires 'EV' => '0';
requires 'AnyEvent' => '5.2';
requires 'AnyEvent::AIO' => '0';
requires 'AnyEvent::IRC' => '0.95';
requires 'AnyEvent::HTTP' => '0';
requires 'Twiggy' => '0';
requires 'Plack' => '0';
requires 'Plack::Session' => '0';
requires 'DBD::SQLite' => '0';
requires 'SQL::Abstract' => '0';
requires 'AnyEvent::DBI' => '0';
requires 'IRC::Formatting::HTML' => '0.28';
requires 'Text::MicroTemplate' => '0.09';
requires 'JSON' => '2.12';
requires 'File::ShareDir' => '0.01';
requires 'File::Copy' => '0';
requires 'Net::SSLeay' => '0';
test_requires 'Test::More' => '0.86';
test_requires 'Test::TCP' => '0';
install_share 'share';
install_script 'bin/alice';

This enabled me to search for each individual package. I couldn't ever figure out a way to find out the deps programatically, so I searched for each one by hand.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .