<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Nov 20, 2007, at 3:42 PM, John Goulah wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Nov 20, 2007 1:16 PM, Mesdaq, Ali &lt;<a href="mailto:amesdaq@websense.com">amesdaq@websense.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Someone said they were going to write a advent calendar entry for using<br>local::lib so I was waiting for that. But just wanted to share my<br>solution as an alternative because some shared hosts are big pains to<br>work with. Some don't even allow outbound connections so using cpan is <br>not an option. So you would basically have to package everything up and<br>lay it down.</blockquote><div><br><br>I'll be writing that, but really if you follow bootstrap instructions , that covers most of it. I'll just cover a couple extras and go into more detail. <br><br>Of course, you'd be out of luck without an outbound connection, I try to avoid those hard to work with hosts :-)<br></div></div><br></blockquote><div><br class="webkit-block-placeholder"></div><div>Not necessarily. &nbsp;There are several ways to work around this problem that I've used with great success. &nbsp;In order of my preference, they are:</div><div><br class="webkit-block-placeholder"></div><div>1. I run squid on my laptop, bound only to the localhost interface and with ACLs that only allow localhost to use it as a general-purpose proxy, then I login to the remote host with a port forward and run cpanp (or cpan) with a proxy configuration...</div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>ssh -R 3128:localhost:3128 server.address&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>server% http_proxy=<a href="http://localhost:3128">http://localhost:3128</a> cpanp<br></div><div><br class="webkit-block-placeholder"></div><div>2. If I'm at a client site where my laptop won't have outgoing access either, then I run apache on the laptop, and use CPAN::Mini to make myself a local mirror of CPAN before I go...</div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>minicpan -l /var/www/html/minicpan -r <a href="http://some.cpan.mirror/">http://some.cpan.mirror/</a><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>ssh -R 8080:localhost:80 server.address<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>server% cpanp (and use <a href="http://localhost:8080/minicpan">http://localhost:8080/minicpan</a> as the mirror address)<br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>3. As a last resort, if the site is so paranoid that ssh forwarding is locked down too, then I still have a fallback...</div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>rsync -essh -avz /var/www/html/minicpan some.secure.host:minicpan<br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>If you write your own mirroring tool instead of using the cpanmini script, you can even exclude stuff from your local mirror...</div></div><div><br class="webkit-block-placeholder"></div><div>#!/usr/bin/perl -w</div><div>use strict;</div><div>use warnings;</div><div>use CPAN::Mini;</div><div><br class="webkit-block-placeholder"></div><div>CPAN::Mini-&gt;update_mirror(</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>remote<span class="Apple-tab-span" style="white-space:pre">                </span>=&gt; '<a href="http://some.cpan.mirror">http://some.cpan.mirror</a>',<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>local<span class="Apple-tab-span" style="white-space:pre">                </span>=&gt; '/data/minicpan',<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>force<span class="Apple-tab-span" style="white-space:pre">                </span>=&gt; 0,<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>trace<span class="Apple-tab-span" style="white-space:pre">                </span>=&gt; 1,<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>skip_perl<span class="Apple-tab-span" style="white-space:pre">        </span>=&gt; 1,<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>path_filters<span class="Apple-tab-span" style="white-space:pre">        </span>=&gt; [<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>qr/(CGI-Application|Maypole|Oracle|Class-DBI)/<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>],<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>module_filters<span class="Apple-tab-span" style="white-space:pre">        </span>=&gt; [<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>qr/Acme/,<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>],<br class="webkit-block-placeholder"></div><div>);</div><div><br></div><div>CPAN::Mini only mirrors the most recent version of each module, so the size is much smaller than you might expect (I believe a minicpan mirror can still fit on a CD-ROM, although I haven't checked that recently...)</div><div><br class="webkit-block-placeholder"></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--&nbsp;</div><div>Jason Kohles, RHCA RHCDS RHCE</div><div>email@jasonkohles.com -&nbsp;<a href="http://www.jasonkohles.com/">http://www.jasonkohles.com/</a></div><div>"A witty saying proves nothing."&nbsp; -- Voltaire</div></span></span></div><br class="Apple-interchange-newline"></span> </div><br></body></html>