{"id":21306994,"url":"https://github.com/perlalien/alien","last_synced_at":"2025-07-11T21:32:05.179Z","repository":{"id":50809087,"uuid":"42126216","full_name":"PerlAlien/Alien","owner":"PerlAlien","description":"Create and use external (non-Perl) dependencies for CPAN!","archived":false,"fork":false,"pushed_at":"2024-12-22T23:58:06.000Z","size":47,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-31T07:08:32.468Z","etag":null,"topics":["alien","perl"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerlAlien.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-09-08T16:55:02.000Z","updated_at":"2024-12-22T23:58:09.000Z","dependencies_parsed_at":"2024-11-21T16:36:43.218Z","dependency_job_id":"ea57debe-a82e-4e61-8734-67a28ea192e1","html_url":"https://github.com/PerlAlien/Alien","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/PerlAlien/Alien","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerlAlien","download_url":"https://codeload.github.com/PerlAlien/Alien/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264902595,"owners_count":23681094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alien","perl"],"created_at":"2024-11-21T16:29:13.888Z","updated_at":"2025-07-11T21:32:04.908Z","avatar_url":"https://github.com/PerlAlien.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alien ![linux](https://github.com/PerlAlien/Alien/workflows/linux/badge.svg)\n\nExternal libraries wrapped up for your viewing pleasure!\n\n# SYNOPSIS\n\n```\n% perldoc Alien\n```\n\n# DESCRIPTION\n\nThe intent of the Alien namespace is to provide a mechanism for specifying,\ninstalling and using non-native dependencies on CPAN.  Frequently this is\na C library used by XS (see [perlxs](https://metacpan.org/pod/perlxs)) or FFI (see [FFI::Platypus](https://metacpan.org/pod/FFI::Platypus)), but\nit could be anything non-Perl usable from Perl.\n\nTypical characteristics of an Alien distribution include:\n\n- Probe for or install library during the build process\n\n    Usually this means that [Module::Build](https://metacpan.org/pod/Module::Build) or [ExtUtils::MakeMaker](https://metacpan.org/pod/ExtUtils::MakeMaker) will\n    be extended to probe for an existing system library that meets the\n    criteria of the Alien module.  If it cannot be found the library is\n    downloaded from the Internet and installed into a share directory (See\n    [File::ShareDir::Dist](https://metacpan.org/pod/File::ShareDir::Dist)).\n\n    Usually, though not necessarily, this is a C library.  It could be\n    anything though, some JavaScript, Java `.class` files.  Anything imaginable.\n\n- The module itself provides attributes needed to use the library\n\n    This means that if you are writing `Alien::Foo` it will provide class\n    or member functions that will provide the necessary information for using\n    the library that was probed for or installed during the previous step.\n\n    If, for example, `Alien::Foo` were providing a dependency on the C\n    library `libfoo`, then you might provide `Alien::Foo-\u003ecflags`\n    and `Alien::Foo-\u003elibs` class methods to return the compiler and\n    library flags required for using the library.\n\nThese are guidelines, and this module does not provide an implementation\nor a framework, because of the diverse nature of non-Perl dependencies\non CPAN.  The more common cases are handled by the [Alien::Base](https://metacpan.org/pod/Alien::Base) +\n[Alien::Build](https://metacpan.org/pod/Alien::Build) system, which is recommended if you want to avoid\nreinventing the wheel.  See the [\"SEE ALSO\"](#see-also) section below for helpful\nresources.\n\n# CAVEATS\n\nThis section contains some recommendations from my own experience in\nwriting Alien modules and from working on the [Alien::Base](https://metacpan.org/pod/Alien::Base) +\n[Alien::Build](https://metacpan.org/pod/Alien::Build) team.  The [Alien::Build](https://metacpan.org/pod/Alien::Build) FAQ ([Alien::Build::Manual::FAQ](https://metacpan.org/pod/Alien::Build::Manual::FAQ))\nalso addresses a number of implementation specific gotchas.\n\n- When building from source code, build static libraries whenever possible\n\n    Or at least isolate the dynamic libraries so they can be used by FFI,\n    but do not use them to build XS modules.  The reason for this is that if\n    an end user upgrades their version of `Alien::Foo` it may break the\n    already installed version of `Foo::XS` that used it when it was\n    installed.\n\n- On Windows (ActiveState, Strawberry Perl)\n\n    Many open source libraries use `autoconf` and other Unix focused tools\n    that may not be easily available to the native (non-Cygwin) windows\n    Perl. [Alien::MSYS](https://metacpan.org/pod/Alien::MSYS) provides just enough of these tools for `autoconf`\n    and may be sufficient for some other build tools.  Also, [Alien::Build](https://metacpan.org/pod/Alien::Build)\n    and [Alien::Base](https://metacpan.org/pod/Alien::Base) have hooks to detect `autoconf` and inject\n    [Alien::MSYS](https://metacpan.org/pod/Alien::MSYS) as a requirement on Windows when it is needed.\n\n- MB vs EUMM\n\n    The original Alien documentation recommends the use of [Module::Build](https://metacpan.org/pod/Module::Build)\n    (MB), which at the time was recommended over [ExtUtils::MakeMaker](https://metacpan.org/pod/ExtUtils::MakeMaker)\n    (EUMM).  Many Alien distributions have been written using MB.  Including\n    the original installer that came with [Alien::Base](https://metacpan.org/pod/Alien::Base),\n    [Alien::Base::ModuleBuild](https://metacpan.org/pod/Alien::Base::ModuleBuild).  I believe this is because it is an easier\n    build system to adapt to the Alien concept.  MB is no longer universally\n    recommended over EUMM, and has been removed from Perl's core, so if you\n    can, this author recommends using EUMM instead.  [Alien::Build](https://metacpan.org/pod/Alien::Build) and\n    [Alien::Build::MM](https://metacpan.org/pod/Alien::Build::MM) provide tools for creating EUMM based Aliens.\n    Another example worth looking at is [Alien::pkgconf](https://metacpan.org/pod/Alien::pkgconf), which uses EUMM,\n    but isn't based on [Alien::Base](https://metacpan.org/pod/Alien::Base) or [Alien::Build](https://metacpan.org/pod/Alien::Build).\n\n# ORIGINAL MANIFESTO\n\nWhat follows is the original Alien manifesto written by Artur Bergman.\nIt is included here, because much of it is still largely true today,\nbut it was out of necessity quite aspirational at the time it was written.\n\n## Why\n\nJames and I ended up doing a build system for Fotango, lots of people\nhave done a build system, it is a pretty boring task. The boring task\nis really all the mindlessly stupid things you need to do to build C\nlibraries that Perl modules require, these C modules usually have\nunusual installation systems or require vastly different options. So\nCPAN modules install easy, 3rd party stuff is nasty.\n\nSo, suddenly an idea struck me, Alien packages! Imagine a CPAN module\nthat has as its only task to make sure a certain library is\ninstalled! That means that you can write all the voodoo in your\nBuild.PL file and then just make sure the module requires the correct\nAlien module! Then anything that install Perl modules will deal with\nit automatically!\n\n## How\n\nSo, what should an Alien module do? It should make sure that the\ntarget is installed and it should provide the caller with enough\ninformation to use it.\n\nThe idea is that you use it to make sure it is there, and you call\nclass methods to find out what to use. These class methods will be\nindividually specified by the stand alone Alien modules.\n\n## No Framework!\n\nThe reason this is so loosely worded is because we have no idea what\ncommon functionality will be needed, so we will let evolution work for\nus and see what individual Alien packages need and then eventually\nfactor it out into this packages. I would like to avoid a top down\ndesign approach.\n\n## Responsibilities of a Alien module.\n\nOn installation, make sure the required package is there, otherwise install it.\n\nOn usage, make sure the required package is there, else croak.\n\nBundle the source with the module, or download it.\n\nAllow module authors to access information it gathers.\n\nDocument itself well.\n\nPreferably use [Module::Build](https://metacpan.org/pod/Module::Build). \\[ see caveats above \\]\n\nBe sane.\n\n# SEE ALSO\n\n- [Alien::Build::Manual::Alien](https://metacpan.org/pod/Alien::Build::Manual::Alien)\n\n    Documentation for building [Alien](https://metacpan.org/pod/Alien)s using the [Alien::Base](https://metacpan.org/pod/Alien::Base) + [Alien::Build](https://metacpan.org/pod/Alien::Build) system.\n    Intended for as a starting point for Alien users and Alien authors.\n\n- [Alien::Build::Manual::FAQ](https://metacpan.org/pod/Alien::Build::Manual::FAQ)\n\n    Quick answers (FAQ) for many common Alien issues.\n\n- [Alien::Build](https://metacpan.org/pod/Alien::Build)\n\n    A new installer agnostic Alien builder, intended to replace\n    [Alien::Base::ModuleBuild](https://metacpan.org/pod/Alien::Base::ModuleBuild).  See [Alien::Build::Manual::AlienAuthor](https://metacpan.org/pod/Alien::Build::Manual::AlienAuthor)\n    for details on how to create your own [Alien::Build](https://metacpan.org/pod/Alien::Build) based Alien.\n\n- [Alien::Base](https://metacpan.org/pod/Alien::Base)\n\n    An (optional) base class and framework for creating Alien distributions.\n\n- [#native on irc.perl.org](http://chat.mibbit.com/#native@irc.perl.org)\n\n    This channel on IRC is dedicated to those interested in using native interfaces\n    in Perl.  It is specifically geared to Alien, [Alien::Base](https://metacpan.org/pod/Alien::Base) and FFI.\n\n- [Perl5 Alien mailing list](https://groups.google.com/forum/#!forum/perl5-alien)\n\n    This mailing list is mainly for [Alien::Base](https://metacpan.org/pod/Alien::Base), and announcements for new\n    versions will be posted there, but general Alien inquires are also welcome.\n\n- [https://github.com/PerlAlien](https://github.com/PerlAlien)\n\n    The Perl Alien organization on GitHub.\n\n# AUTHORS\n\n- Arthur Bergman \u003cabergman@fotango.com\u003e\n- Graham Ollis \u003cplicease@cpan.org\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2003 by Arthur Bergman \u003cabergman@fotango.com\u003e.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperlalien%2Falien","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperlalien%2Falien","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperlalien%2Falien/lists"}