CPAN-Mirror-Tiny
view release on metacpan or search on metacpan
lib/CPAN/Mirror/Tiny.pm view on Meta::CPAN
$cpan->inject_local_directory('/path/to/cpan/dir', {author => 'YOU'});
$cpan->inject_http('http://example.com/Hoge-0.01.tar.gz', {author => 'YOU'});
$cpan->inject_git('git://github.com/skaji/Carl.git', {author => 'SKAJI'});
$cpan->inject_cpan('Plack', {version => '1.0039'});
Inject C< $source > to our cpan mirror directory. C< $source > is one of
=over 4
=item * local tar.gz path / directory
$cpan->inject('/path/to/Module.tar.gz', { author => "SKAJI" });
$cpan->inject('/path/to/dir', { author => "SKAJI" });
=item * http url of tar.gz
$cpan->inject('http://example.com/Module.tar.gz', { author => "DUMMY" });
=item * git url (with optional ref)
$cpan->inject('git://github.com/skaji/Carl.git', { author => "SKAJI", ref => '0.114' });
=item * cpan module
$cpan->inject('cpan:Plack', {version => '1.0039'});
=back
As seeing from the above examples, you can specify C<author> in C<\%option>.
If you omit C<author>, default C<VENDOR> is used.
B<CAUTION>: Currently, the distribution name for git repository is something like
C<S/SK/SKAJI/Carl-0.01-9188c0e.tar.gz>,
where C<0.01> is the version and C<9188c0e> is C<git rev-parse --short HEAD>.
=head2 index
my $index_string = $cpan->index
Get the index (a.k.a. 02packages.details.txt) of our cpan mirror.
=head2 write_index
$cpan->write_index( compress => bool )
Write the index to C< $base/modules/02packages.details.txt >
or C< base/modules/02packages.details.txt.gz >.
=head1 TIPS
=head2 How can I install modules in my DarkPAN with cpanm / cpm?
L<cpanm> is an awesome CPAN client. If you want to install modules
in your DarkPAN with cpanm, there are 2 ways.
First way:
cpanm --cascade-search \
--mirror-index /path/to/darkpan/modules/02packages.details.txt \
--mirror /path/to/darkpan \
--mirror http://www.cpan.org \
Your::Module
Second way:
cpanm --mirror-only \
--mirror /path/to/darkpan \
--mirror http://www.cpan.org \
Your::Module
If you use L<cpm>, then:
cpm install -r 02packages,file:///path/to/drakpan -r metadb Your::Module
=head1 ARTIFACT ATTESTATIONS
GitHub Artifact Attestations are generated for release tarballs uploaded to
CPAN. If you care about provenance for the uploaded tarballs, see:
L<https://github.com/skaji/CPAN-Mirror-Tiny/attestations>
=head1 COPYRIGHT AND LICENSE
Copyright 2016 Shoichi Kaji <skaji@cpan.org>
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
( run in 1.856 second using v1.01-cache-2.11-cpan-63c85eba8c4 )