in reply to Re: Re (tilly) 2: ADD PATH TO @INC
in thread ADD PATH TO @INC

That and (before damian1301 fixed the main issue) a question of timing. He didn't have a BEGIN block so his push happened at run-time while a use happens at compile time.

A more subtle point. lib doesn't bother to put its unshift in a BEGIN block and it works just fine. If you were writing a module and you wanted to affect someone's @INC you could ignore the BEGIN and it works. Which works because runtime for a module compile time for anything that uses it.