A colleague has asked me recently why the following ends in Global symbol "$lib" requires explicit package name
use lib my $lib = '.';
My answer was that the code is equivalent to
'lib'->import(my $lib = '.');
But I was kind of unhappy about it.
Is it a feature that use creates a scope around its parameters, or was it just easier to implement it like that? Have you noticed the behaviour and what do you think about it?