CPAN-Dependency

 view release on metacpan or  search on metacpan

lib/CPAN/Dependency.pm  view on Meta::CPAN

C<CPAN::Dependency> uses C<CPANPLUS> when processing CPAN distributions, 
which means that you need to configure CPANPLUS for the account that will 
run the C<CPAN::Dependency> based scripts. Simply execute the C<cpanp(1)> 
for this. If the account is not supposed to have access to the Internet, 
use a mini-CPAN mirror. See also L<"Local mirror">. 


=head1 SPEED TIPS

Here are a few tips to speed up the processing when you want to process 
many modules (or the whole CPAN). 

=head2 Local mirror

If it's not the case yet, you should use C<CPAN::Mini> to create your own 
mini-CPAN local mirror. Then you just need to configure C<CPANPLUS> to 
use your mini-CPAN instead of a network mirror. A mini-CPAN can also be 
shared using a web server but if you want speed, you should keep one on 
your local filesystem.

Note that you can also add your own private distributions into your 
mini-CPAN using C<CPAN::Mini::Inject>. This is useful if you want to 
use C<CPAN::Dependency> on modules that are not publicly shared on 
the CPAN. 

For more information see L<CPAN::Mini> and L<CPAN::Mini::Inject>.

=head2 Ramdisk

If your system supports this feature (most modern systems do), you should 
create a ramdisk and move the C<CPANPLUS> build directory onto the ramdisk. 
Here are the instructions for Linux. Other systems are left as an exercise 
for the reader C<:-)>

=head3 Ramdisk for Linux

The following commands must be executed as root. 
cpanplus is assumed to be the user that will executes this module. 

=over 4

=item *

Create a ramdisk of S<32 MB>: 

    dd if=/dev/zero of=/dev/ram0 bs=1M count=32

=item *

Format it and creates an Ext2 filesystem: 

    mke2fs -L ramdisk0 /dev/ram0

=item *

Now mount it: 

    mkdir /mnt/ramdisk
    mount /dev/ram0 /mnt/ramdisk/
    mkdir /mnt/ramdisk/cpanplus
    chown cpanplus /mnt/ramdisk/cpanplus/

=item *

Now, as the user cpanplus, move the build directory onto the ramdisk 
and symlink it: 

    mv .cpanplus/5.8.5 /mnt/ramdisk/cpanplus/
    ln -s /mnt/ramdisk/cpanplus/5.8.5 .cpanplus/5.8.5

=back

Note that we are explicitly avoiding to move the whole F<.cpanplus/> 
directory because it will grow really big during the processing: 
some C<CPANPLUS> cache files are already big, and the sub-directory 
F<author/> will contain a copy of each processed archive. When processing 
the whole CPAN, it means that you'll have here a complete copy of your 
mini-CPAN, so be sure that you have enough disk space (or symlink 
this directory as well to another volume when you have enough space). 

=head3 Ramdisk for Mac OS X

Here is a small shell script that creates, format and mount a ramdisk 
of S<64 MB>. Its size can be changed by changing the number of blocks, 
where one block is S<512 bytes>. This is a version for OS X.5 and newer:

    #!/bin/sh
    BLOCK=128000
    diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://$BLOCKS`

and here is a version for OS X.4 and previous:

    #!/bin/sh
    BLOCK=128000
    dev=`hdid -nomount ram://$BLOCKS`
    newfs_hfs -v RAMDisk $dev
    mkdir /Volumes/RAMDisk
    chmod 777 /Volumes/RAMDisk
    mount -t hfs $dev /Volumes/RAMDisk

Then follow the same instructions for moving the F<build/> directory 
as given for Linux. 

=head3 Ramdisk for Solaris

Beginning with Solaris 9 12/03, Solaris includes a C<ramdiskadm(1M)> 
command for managing ramdisks. Below are the links for the documentation 
of that command. 

=over 4

=item *

Solaris 11:
C<ramdiskadm(1M)> (L<http://docs.oracle.com/cd/E19963-01/html/821-1462/ramdiskadm-1m.html>)

=item *

Solaris 10: 
C<ramdiskadm(1M)> (L<http://docs.sun.com/app/docs/doc/816-5166/6mbb1kqcv?a=view>)



( run in 0.415 second using v1.01-cache-2.11-cpan-71847e10f99 )