Mailing List Archive

Easier way to install CPAN module dependencies
I've been running through the Interchange install process and I think we
can make this a bit easier for new users.

One is how to get all the CPAN modules installed. Typically this is done
with Bundle::Interchange. `make install` will even attempt this
installtion for you, but it is pretty cumbersome, in today's world of
great tools like "cpanm".

A more modern way to get this done would be to use cpanfile or Carton,
or even Makefile.PL and then instruct users to simply run
`cpanm --installdeps .`
(and of course, let them know they should install cpanm first, which is
the popular choice for CPAN installs today).

These methods would allow us to maintain our dependency lists in our
source code, without requiring maintenance of an external module.

I tried setting Makefile.PL's PREREQ_PM and making a tardist to test it.
However, when I ran `cpanm --installdeps .` it wanted to "configure
interchange-v5.10.0" and failed:

$ cpanm --installdeps .
--> Working on .
Configuring interchange-v5.10.0 ... FAIL
! Timed out (> 60s). Use --verbose to retry.
[1] 19456 terminated cpanm --installdeps .

It went on to install the dependencies, but the failure would be pretty
alarming to a new user.

However, using a cpanfile is as simple as listing the dependencies:

requires 'Bundle::LWP';
requires 'Crypt::Random';
requires 'DBI';
requires 'Digest::Bcrypt';
requires 'Digest::MD5';
requires 'Digest::SHA';
requires 'HTML::Entities';
requires 'HTML::Tagset';
requires 'Image::Size';
requires 'IO::Scalar';
requires 'JSON';
requires 'MIME::Base64';
requires 'MIME::Lite';
requires 'Net::IP::Match::Regexp';
requires 'OLE::Storage_Lite';
requires 'Parse::RecDescent';
requires 'Safe::Hole';
requires 'Set::Crontab';
requires 'Spreadsheet::ParseExcel';
requires 'Spreadsheet::WriteExcel';
requires 'Storable';
requires 'Term::ReadKey';
requires 'Term::ReadLine::Perl';
requires 'Text::Query';
requires 'Tie::ShadowHash';
requires 'URI::URL';

and installing with `cpanm --installdeps .` does fine (although I still
have trouble getting Digest::Bcrypt's Math::Pari to pass all the tests
for some reason).

I couldn't find that we require minimum versions of any of the modules
above, but please set me straight if that's not right.

I've already committed a cpanfile and updated the README to refer to it:
https://github.com/interchange/interchange/commit/3dce5d3e2695bc0a12f81e48a69ed86ed5d9c9c3

although I left the instructions for Bundle::Interchange.

--
Josh Lavin
End Point Corporation

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Easier way to install CPAN module dependencies [ In reply to ]
On Wed, 6 Jul 2016, Josh Lavin wrote:

> However, using a cpanfile is as simple as listing the dependencies:
[snip]
>
> and installing with `cpanm --installdeps .` does fine (although I still
> have trouble getting Digest::Bcrypt's Math::Pari to pass all the tests
> for some reason).

Nice. That'll make life easier for users.

We'll have to make sure people remember to keep that list current as
module requirement changes, but that's fairly rare.

> I couldn't find that we require minimum versions of any of the modules
> above, but please set me straight if that's not right.

I'm not aware of any.

Thanks,
Jon

--
Jon Jensen
End Point Corporation
https://www.endpoint.com/

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Easier way to install CPAN module dependencies [ In reply to ]
On 07/07/16 10:48, Josh Lavin wrote:
> One is how to get all the CPAN modules installed. Typically this is done
> with Bundle::Interchange. `make install` will even attempt this
> installtion for you, but it is pretty cumbersome, in today's world of
> great tools like "cpanm".
>
> A more modern way to get this done would be to use cpanfile or Carton,
> or even Makefile.PL and then instruct users to simply run
> `cpanm --installdeps .`
> (and of course, let them know they should install cpanm first, which is
> the popular choice for CPAN installs today).

There should be a way to use make or cpanm to install the additional
kitchensink modules as well if we're going to recommend this route.


Peter

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Re: Easier way to install CPAN module dependencies [ In reply to ]
Quoting Peter (peter@pajamian.dhs.org):
> On 07/07/16 10:48, Josh Lavin wrote:
> > One is how to get all the CPAN modules installed. Typically this is done
> > with Bundle::Interchange. `make install` will even attempt this
> > installtion for you, but it is pretty cumbersome, in today's world of
> > great tools like "cpanm".
> >
> > A more modern way to get this done would be to use cpanfile or Carton,
> > or even Makefile.PL and then instruct users to simply run
> > `cpanm --installdeps .`
> > (and of course, let them know they should install cpanm first, which is
> > the popular choice for CPAN installs today).
>
> There should be a way to use make or cpanm to install the additional
> kitchensink modules as well if we're going to recommend this route.

Is there any reason we shouldn't be able to just do an extension to
the existing interrogation, look for cpanm in the executable chain, then
make the appropriate decision on running "perl Makefile.PL"?

It's not like we have to account for Windows or any other OS. It's all
*nix of some sort or another.

--
Mike Heins
End Point -- Expert Internet Consulting http://www.endpoint.com/
phone +1.765.253.4194 <mikeh@endpoint.com>

The sun, with all those planets revolving around it and
dependent on it, can still ripen a bunch of grapes as if
it had nothing else in the universe to do. -- Galileo

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users