in reply to using my module.pm in different directory error

Quick and dirty: PERL5LIB

Long and clean: use proper namespaces and package your script and modules into a distribution as you would for CPAN. eg. put your modules under a namespace like "App::URS::" which would equate to a directory like App/URS/, install them into the site_perl tree and then your script should use them with lines like:

use App::URS::YAML;

You'll probably have to read up on packages and it would benefit to look at Module::Starter or similar. See also Simple Module Tutorial and How to make a CPAN Module Distribution. It's a long road for sure but well worth it and will make problems like the one you currently have just vanish.