The reason that moving the "use" doesn't work is that use is evaluated as if it were inside a BEGIN block. If you switch to "require", that will work, but you will have to call import as well. See "perldoc -f use" for more.
Comment on Re: Re: Re: Re: Re: DBD::mysql with a forked processes caused lost MySQL connection unless mysql_auto_reconnect is set?