gideondsouza has asked for the wisdom of the Perl Monks concerning the following question:
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:
use lib("path_to_my_module/lib");
Everything works ok till I try to run the default tests (generated by module starter). I get:
# 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.pmIt fails this test:
Thats all because the path is not right. But, even if I use use lib(path to_module) it doesn't work.BEGIN { use_ok( 'Dancer::Plugin::Foo' ) || print "Bail out!\n"; }
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!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how do you build and test your modules locally before publishing
by davido (Cardinal) on Dec 31, 2012 at 02:27 UTC | |
by tobyink (Canon) on Dec 31, 2012 at 11:40 UTC | |
by davido (Cardinal) on Dec 31, 2012 at 17:21 UTC | |
by gideondsouza (Pilgrim) on Dec 31, 2012 at 03:57 UTC | |
by tobyink (Canon) on Dec 31, 2012 at 11:35 UTC | |
by davido (Cardinal) on Dec 31, 2012 at 04:01 UTC | |
Re: how do you build and test your modules locally before publishing
by Anonymous Monk on Dec 31, 2012 at 02:29 UTC |
Back to
Seekers of Perl Wisdom