Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Non-standard Perl Module Locations



On 2008-03-13 16:05 +0900 (Thu), Curt Sampson wrote:

>     @inc_prefix = map {
> 	($path = $_) =~ s,.*/lib/,$base/lib/,; $path
> 	} grep(/\/lib\//, @INC);

By the way, this introduced me the hard way to some true nastyness in
perl. My original code's map function was just:

    map { s,.*/lib/,$base/lib/ }

of course everything exploded, because this returned nothing but an
array with a lot of 1s in it, and even when I fixed that, it went and
modified the paths in my orginal @INC array!

Man, non-functional programming sucks.

cjs
-- 
Curt Sampson       <cjs@example.com>        +81 90 7737 2974   
Mobile sites and software consulting: http://www.starling-software.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links