I've been trying my hand at making a simple perl module.
Now, so far I write this on the top of the file where I want to use the module to test it out:
Everything works ok till I try to run the default tests (generated by module starter).
# Failed test 'use Dancer::Plugin::Foo;'
# at t/00-load.t line 12.
# Tried to use 'Dancer::Plugin::Foo'.
# Error: Can't locate Dancer/Plugin/Foo.pm
It fails this test:
use_ok( 'Dancer::Plugin::Foo' ) || print "Bail out!\n";
Thats all because the path is not right. But, even if I use use lib(path to_module)
it doesn't work.
How do you guys usually use and test your modules locally before publishing them? How should I get the test to pass? I can't just add a use lib there!