move 'use <module>;' to the package header
this makes it easier to see which external libraries / modules are required

Please note: 'use <module>;' is always be executed, location does not matter.

  use <module> qw(command);

  sub function {
    command();
  }

and

  sub function {
    use <module> qw(command);
    command();
  }

are equivalent! '<module>' is always loaded, even if no-one calls function();

You need to use 'require' to load a module on-demand:

  sub function {
    require <module>;
    <module>::command();
  }