.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "CPAN::Mini::Inject 3pm" .TH CPAN::Mini::Inject 3pm "2017-11-04" "perl v5.26.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" CPAN::Mini::Inject \- Inject modules into a CPAN::Mini mirror. .SH "VERSION" .IX Header "VERSION" Version 0.35 .SH "Synopsis" .IX Header "Synopsis" If you're not going to customize the way CPAN::Mini::Inject works you probably want to look at the mcpani command instead. .PP .Vb 1 \& use CPAN::Mini::Inject; \& \& $mcpi=CPAN::Mini::Inject\->new; \& $mcpi\->parsecfg(\*(Aqt/.mcpani/config\*(Aq); \& \& $mcpi\->add( module => \*(AqCPAN::Mini::Inject\*(Aq, \& authorid => \*(AqSSORICHE\*(Aq, \& version => \*(Aq 0.01\*(Aq, \& file => \*(Aqmymodules/CPAN\-Mini\-Inject\-0.01.tar.gz\*(Aq ) \& \& $mcpi\->writelist; \& $mcpi\->update_mirror; \& $mcpi\->inject; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" CPAN::Mini::Inject uses CPAN::Mini to build or update a local \s-1CPAN\s0 mirror then adds modules from your repository to it, allowing the inclusion of private modules in a minimal \s-1CPAN\s0 mirror. .SH "METHODS" .IX Header "METHODS" Each method in CPAN::Mini::Inject returns a CPAN::Mini::Inject object which allows method chaining. For example: .PP .Vb 4 \& my $mcpi=CPAN::Mini::Inject\->new; \& $mcpi\->parsecfg \& \->update_mirror \& \->inject; .Ve .PP A \f(CW\*(C`CPAN::Mini::Inject\*(C'\fR \s-1ISA\s0 CPAN::Mini. Refer to the documentation for that module for details of the interface \&\f(CW\*(C`CPAN::Mini::Inject\*(C'\fR inherits from it. .ie n .SS """new""" .el .SS "\f(CWnew\fP" .IX Subsection "new" Create a new CPAN::Mini::Inject object. .ie n .SS """config_class( [CLASS] )""" .el .SS "\f(CWconfig_class( [CLASS] )\fP" .IX Subsection "config_class( [CLASS] )" Returns the name of the class handling the configuration. .PP With an argument, it sets the name of the class to handle the config. To use that, you'll have to call it before you load the configuration. .ie n .SS """config""" .el .SS "\f(CWconfig\fP" .IX Subsection "config" Returns the configuration object. This object should be from the class returned by \f(CW\*(C`config_class\*(C'\fR unless you've done something weird. .ie n .SS """loadcfg( [FILENAME] )""" .el .SS "\f(CWloadcfg( [FILENAME] )\fP" .IX Subsection "loadcfg( [FILENAME] )" This is a bridge to CPAN::Mini::Inject::Config's loadconfig. It sets the filename for the configuration, or uses one of the defaults. .ie n .SS """parsecfg()""" .el .SS "\f(CWparsecfg()\fP" .IX Subsection "parsecfg()" This is a bridge to CPAN::Mini::Inject::Config's parseconfig. .ie n .SS """site( [SITE] )""" .el .SS "\f(CWsite( [SITE] )\fP" .IX Subsection "site( [SITE] )" Returns the \s-1CPAN\s0 site that CPAN::Mini::Inject chose from the list specified in the \f(CW\*(C`remote\*(C'\fR directive. .ie n .SS """testremote""" .el .SS "\f(CWtestremote\fP" .IX Subsection "testremote" Test each site listed in the remote parameter of the config file by performing a get on each site in order for authors/01mailrc.txt.gz. The first site to respond successfully is set as the instance variable site. .PP .Vb 1 \& print "$mcpi\->{site}\en"; # ftp://ftp.cpan.org/pub/CPAN .Ve .PP \&\f(CW\*(C`testremote\*(C'\fR accepts an optional parameter to enable verbose mode. .ie n .SS """update_mirror""" .el .SS "\f(CWupdate_mirror\fP" .IX Subsection "update_mirror" This is a subclass of CPAN::Mini. .ie n .SS """add""" .el .SS "\f(CWadd\fP" .IX Subsection "add" Add a new module to the repository. The add method copies the module file into the repository with the same structure as a \s-1CPAN\s0 site. For example CPAN\-Mini\-Inject\-0.01.tar.gz is copied to MYCPAN/authors/id/S/SS/SSORICHE. add creates the required directory structure below the repository. .PP Packages found in the distribution will be added to the module list (for example both \f(CW\*(C`CPAN::Mini::Inject\*(C'\fR and \f(CW\*(C`CPAN::Mini::Inject::Config\*(C'\fR will be added to the \fImodules/02packages.details.txt.gz\fR file). .PP Packages will be looked for in the \f(CW\*(C`provides\*(C'\fR key of the \s-1META\s0 file if present, otherwise the files in the dist will be searched. See Dist::Metadata for more information. .IP "\(bu" 4 module .Sp The name of the module to add. The distribution file will be searched for modules but you can specify the main one explicitly. .IP "\(bu" 4 authorid .Sp \&\s-1CPAN\s0 author id. This does not have to be a real author id. .IP "\(bu" 4 version .Sp The modules version number. Module names and versions will be determined, but you can specify one explicitly. .IP "\(bu" 4 file .Sp The tar.gz of the module. .PP \fIExample\fR .IX Subsection "Example" .PP .Vb 4 \& add( module => \*(AqModule::Name\*(Aq, \& authorid => \*(AqAUTHOR\*(Aq, \& version => 0.01, \& file => \*(Aq./Module\-Name\-0.01.tar.gz\*(Aq ); .Ve .ie n .SS """added_modules""" .el .SS "\f(CWadded_modules\fP" .IX Subsection "added_modules" Returns a list of hash references describing the modules added by this instance. Each hashref will contain \f(CW\*(C`file\*(C'\fR, \f(CW\*(C`authorid\*(C'\fR, and \f(CW\*(C`modules\*(C'\fR. The \f(CW\*(C`modules\*(C'\fR entry is a hashref of module names and versions included in the \f(CW\*(C`file\*(C'\fR. .PP The list is cumulative. There will be one entry for each time \*(L"add\*(R" was called. .PP This functionality is mostly provided for the included mcpani script to be able to verbosely print all the modules added. .ie n .SS """inject""" .el .SS "\f(CWinject\fP" .IX Subsection "inject" Insert modules from the repository into the local CPAN::Mini mirror. inject copies each module into the appropriate directory in the CPAN::Mini mirror and updates the \s-1CHECKSUMS\s0 file. .PP Passing a value to \f(CW\*(C`inject\*(C'\fR enables verbose mode, which lists each module as it's injected. .ie n .SS """updpackages""" .el .SS "\f(CWupdpackages\fP" .IX Subsection "updpackages" Update the CPAN::Mini mirror's modules/02packages.details.txt.gz with the injected module information. .ie n .SS """updauthors""" .el .SS "\f(CWupdauthors\fP" .IX Subsection "updauthors" Update the CPAN::Mini mirror's authors/01mailrc.txt.gz with stub information should the author not actually exist on \s-1CPAN\s0 .ie n .SS """readlist""" .el .SS "\f(CWreadlist\fP" .IX Subsection "readlist" Load the repository's modulelist. .ie n .SS """writelist""" .el .SS "\f(CWwritelist\fP" .IX Subsection "writelist" Write to the repository modulelist. .SH "See Also" .IX Header "See Also" CPAN::Mini .SH "Current Maintainer" .IX Header "Current Maintainer" Christian Walde \f(CW\*(C`\*(C'\fR .SH "Original Author" .IX Header "Original Author" Shawn Sorichetti, \f(CW\*(C`\*(C'\fR .SH "Acknowledgements" .IX Header "Acknowledgements" Special thanks to David Bartle, for bringing this module up to date, and resolving the reported bugs. .PP Thanks to Jozef Kutej for numerous patches. .SH "Bugs" .IX Header "Bugs" Please report any bugs or feature requests to \&\f(CW\*(C`bug\-cpan\-mini\-inject@rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "Copyright & License" .IX Header "Copyright & License" Copyright 2008\-2009 Shawn Sorichetti, Andy Armstrong, All Rights Reserved. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.