See local::lib.
Once you have it installed, you can do:
perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP)'
More Related Contents:
- How can I install a CPAN module into a local directory?
- How can I use a new Perl module without install permissions?
- How do I choose a package name for a custom Perl module that does not collide with builtin or CPAN packages names?
- How can I install a specific version of a set of Perl modules?
- How can I find the version of an installed Perl module?
- Failing to install MIME::Base64 using cpan [closed]
- What’s the easiest way to install a missing Perl module?
- How can I use CPAN as a non-root user?
- How can I require an optional Perl module if installed?
- How do I “use” a Perl module in a directory not in @INC?
- How can I dynamically include Perl modules without using eval?
- What is the difference between new Some::Class and Some::Class->new() in Perl?
- How can I install CPAN modules locally without root access (DynaLoader.pm line 229 error)?
- How do YOU manage Perl modules when using a package manager?
- Which cpan installer is the right one? (CPAN.pm/CPANPLUS/cpanminus)
- Why is the Switch module deprecated in Perl?
- In Perl, how can I check from which module a given function was imported?
- Can a Perl script install its own CPAN dependencies?
- How do I tell CPAN to install all dependencies?
- How can i do this in perl, shortcut truthtable [closed]
- What does this HTML::Parser() code do in Perl? [closed]
- Why use strict and warnings?
- What’s the difference between Perl’s backticks, system, and exec?
- Using perl’s `system`
- How can I check if a file exists in Perl?
- Using Encode::encode with “utf8”
- How can I extract URL and link text from HTML in Perl?
- How can I start an interactive console for Perl?
- How can I extract text from a PDF file in Perl?
- How do I retrieve the terminal width in Perl?