Backend

Backend is the scripter's interface to CPANPLUS. It can be used to make custom install scripts, as well as alternate shells.

This document won't go in to the full details of Backend's API. Instead, look at the pod documentation accompanying the module for a full list of features and functions.

As a taste of what Backend can be used for, here's an example (minus error checking) that came from the question "Can CPANPLUS install all modules in the POE namespace?"

use CPANPLUS::Backend;
my $cb = new CPANPLUS::Backend;
my $search = $cb->search(type=>'module', list=>['^POE::', '^POE$'])
my $install = $cb->install(modules => [keys %$search]);

With search it is also possible to supply regex options, such as in this example, where a (case-)insensitive 'kane' is the search argument. For more information on using flags this way, refer to perldoc perlre.

$search = $cb->search(type=>'author', list=>['(?i:kane)']);