GSP
Quick Navigator

Search Site

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

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  OREPAN2::INJECTOR (3)

.ds Aq ’

NAME

OrePAN2::Injector - Inject a distribution to your DarkPAN

CONTENTS

SYNOPSIS



    use OrePAN2::Injector;

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

    $injector->inject(
        http://cpan.metacpan.org/authors/id/M/MA/MAHITO/Acme-Hoge-0.03.tar.gz,
        { author => MAHITO },
    );



DESCRIPTION

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

METHODS

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

Constructor. Here %attr might be:
o directory

Your DarkPAN directory path. This is required.

o author

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

<B>BETAB>: 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,
    );

    $injector->inject(
        http://cpan.metacpan.org/authors/id/M/MA/MAHITO/Acme-Hoge-0.03.tar.gz
    );
    #=> 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:
o local archive file

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

o HTTP url

eg: http://cpan.metacpan.org/authors/id/T/TO/TOKUHIROM/Text-TestBase-0.10.tar.gz

o git repository

eg: git://github.com/tokuhirom/Text-TestBase.git@master

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+file://path/to/repo.git
    git://github.com/plack/Plack.git@1.0000        # tag
    git://github.com/plack/Plack.git@devel         # branch



They are compatible with cpanm.

o module name

eg: Data::Dumper

\%option might be:
o author

Author of the distribution. This overrides new’s author attribute.

SEE ALSO

orepan2-inject

LICENSE

Copyright (C) tokuhirom.

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

AUTHOR

tokuhirom <tokuhirom@gmail.com>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 OREPAN2::INJECTOR (3) 2015-07-14

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