Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
OrePAN2::Injector(3) User Contributed Perl Documentation OrePAN2::Injector(3)

OrePAN2::Injector - Inject a distribution to your DarkPAN

    use OrePAN2::Injector;

    my $injector = OrePAN2::Injector->new(directory => '/path/to/darkpan');

        { author => 'MAHITO' },

OrePAN2::Injector allows you to inject a distribution into your DarkPAN.

"my $injector = OrePAN2::Injector->new(%attr)"

Constructor. Here %attr might be:

  • directory

    Your DarkPAN directory path. This is required.

  • author

    Default author of distributions. If you omit this, then "DUMMY" will be used.

    BETA: As of OrePAN2 0.37, the author attribute accepts a code reference, so that you can calculate author whenever injecting distributions:

        my $author_cb = sub {
            my $source = shift;
            $source =~ m{authors/id/./../([^/]+)} ? $1 : "DUMMY";
        my $injector = OrePAN2::Injector->new(
            directory => '/path/to/darkpan',
            author => $author_cb,
        #=> Acme-Hoge-0.03 will be indexed with author MAHITO

    Note that the code reference $author_cb will be executed under the following circumstances:

        * the first argument is the $source argument to the inject method
        * the working directory of it is the top level of the distribution in question

"$injector->inject($source, \%option)"

Inject $source to your DarkPAN. Here $source is one of the following:

  • local archive file

    eg: /path/to/Text-TestBase-0.10.tar.gz

  • HTTP url


  • git repository

    eg: git://

    Note that you need to set up git repository as a installable git repo, that is, you need to put a META.json in your repository.

    If you are using Minilla or Milla, your repository is already ready to install.

    Supports the following URL types:

        git://        # tag
        git://         # branch

    They are compatible with cpanm.

  • module name

    eg: Data::Dumper

"\%option" might be:


Author of the distribution. This overrides "new"'s author attribute.


Copyright (C) tokuhirom.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

tokuhirom <>
2015-07-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.