OT: module related question

Radoslaw Zielinski radek at pld-linux.org
Fri Sep 7 20:02:19 BST 2007


Martin Bower <martin.bower at gmail.com> [07-09-2007 15:48]:
[...]
> How can I refer to that file from within the module so I can retrieve it ?!?
> The module has installed into lib/site_perl/5.6.1 , but is there some clever
> method of finding out where its installed to ?

%INC:

File::Basename::dirname( $INC{ join( "/", __PACKAGE__ =~ /([^:]+)/g ) . '.pm' } )

> To make it slightly complicated, I'll need to build this on Solaris and
> Windoze, and was going to use $^0 to determine which.

OS shouldn't matter here.

-- 
Radosław Zieliński <radek at pld-linux.org>


More information about the london.pm mailing list