Had a brain wave this evening and came up with the following solution.

Replace /usr/lib/perl5 with /usr/local/.p5 in the perl binary[1].  Then
create a symlink from /usr/local/.p5 to /usr/local/lib/perl5.  The .p5
directory doesn't display in /usr/local so everything looks neat and tidy.

I am then left with the whole perl installation entirely contained in
/usr/local which means I can remove the Compact Flash card (containing perl)
without leaving any loose ends lying around in the main filesystem of my

The next challenge will be getting gcc onto the iPAQ so that I can then
rebuild perl from scratch :)


[1] Strangely enough, perl came in pretty handy for this task.

s&&!msfQ!&&s&$&utvK&&s&(Q)&\1!sfiupoB&&s&^&reverse Ibdlfs&e&s&^&#
&&s&$&#!uojsq&&s&(.)&chr(ord($1)-1)&ge&s&(.*)&reverse $1&see

----- Original Message -----
From: Paul Makepeace <[EMAIL PROTECTED]>
Sent: Monday, June 11, 2001 9:43 PM
Subject: Re: Default library paths

> On Mon, Jun 11, 2001 at 10:25:32AM +0100, Dominic Mitchell wrote:
> > You're very probably stuck.  Whilst you can use a hex editor to change
> > strings in the binary, you can't expand the length of those strings,
> > only contract them or retain the same length.
> >
> > However, a solution would be to change the perl binary to use /opt/lib
> > instead of /usr/lib and make /opt a symlink to /usr/local.
> >
> > There's a couple of reasonable hex editors out there, but I usually just
> > tend to use M-x hexl-find-file in emacs.  If you're a vim user, see
> > xxd(1).
> Presumably if you know the string, and they're all going to be replaced
> (as sounds like the case) you could use perl -pi -0e
> 's~/usr/lib/~/opt/lib~g' in whole-file-slurp mode (is that the right
> switch, -0?).
> Paul
> --
> Intentions
> -credibility of
> -nobility of
> -humility of

Reply via email to