On 11-12-15 10:09 AM, Brian Fraser wrote:
Close, but that won't work, because keys in %INC are paths, and you are
still leaving the ::'s unchanged.

use 5.014;
use File::Basename; # must be before `use lib`
use lib dirname( $INC{ __PACKAGE__ =~ s!::!/!r . '.pm' } );
That should do. Plus more mangling if you don't use /r :)

Oops. You're right. Didn't test that case. Sorry. Not that this is not a wise thing to do.


--
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

Never give up your dreams.  Give up your goals, plans,
strategy, tactics, and anything that's not working but never
give up your dreams.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to