[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Alien::*



Joenio Costa:

> I think Alien::* is usefull on Debian only to indicate dependencies from
> Perl modules to any external tool or library.

I don't think that Alien::* modules make sense in Debian, where
we already have the means to build external tools as Debian
packages and mention them in debian/control as Depends and/or
Build-Depends.

> In that specific case, Alien::Autotools is a compilation dependency for
> SLOCCount, a tool that I'm wrapping around a new Perl module
> Alien::SLOCCount. I need SLOCCount because I'm working on a Perl project
> that depends that.

A quick search on metacpan showed that there's App::cloc, that
can use sloccount from the system if present. I think that this
is much better approach to add support for external tools than
adding new Alien dists to CPAN.

AFAICS, Alien is only helpful to make it easier to install some
external dependencies that could prove difficult for some people
otherwise (Wx comes to mind). Although it seems the wrong way of
solving the issue when the target system has already the needed
external tools as packages.

> As upstream Perl developer, every time I need some external tool I can
> declare a dependency using Alien::* namespace. As a Debian pkg-perl
> developer packaging some peace of module I no need to interpret external
> tool dependency to declare it in debian/control manually. I declare
> dependencies in debian/control the same way the upstream do.

Since Debian has sloccount already, I see no reason to package
Alien::SLOCCount dist nor its Alien::* dependencies. Wouldn't be
easier to find sloccount in PATH and fail suggesting to install it
otherwise? Devel::CheckBin should help with that (you can see its
usage in Git::Wrapper, for example).


Florian Schlichting:

> For example, if your new CPAN module needs Alien::xz, you would add
> 'xz-utils' to both Depends: and Build-Depends: and patch out all 'use
> Alien::xz', 'Alien::xz->bin_dir' and '%{xz}', as you can safely assume
> that xz is called xz and is already in your $PATH.

I wouldn't recommend any CPAN author to depend on Alien::* unless
there's no other way. In this particular case, it'd be more useful
to depend on IO::Compress::Xz and I'd suggest upstream to use it
instead.

In other words, my advice would be to stay away from Alien as long
as you can and it'd be a safer, more pleasant experience for all.

Cheers!
Alex


Reply to: