Aldo Calpini wrote:
> I'm wondering how you are including the module in your test... should be
> just a plain:
>
> use My::Module;
----
My module had it's own tests built-in to it before I tried to put it
on CPAN.
So I'm trying to use it's built-in modules.
I.e. if you make the module runnable, and call it "P.pm", it a short
demo of it's
methods of usage -- which also act as an internal test:
> P.pm
#1 (ret from func) : Hello Perl 1
#2 (w/string) : Hello Perl 2
#3 (passed array) : Hello Perl 3
#4 (w/fmt+string) : Hello Perl 4
#5 (to STDERR) : Hello Perl 5
#6 (to strng embedded in #7):
#7 (prev string) : prev str="Hello Perl 6" (no LF) && Hello
Perl 7
#8 (p thru '/.../rev' fr/FH): <*=8 lreP olleH )ohce(>
#9 (P && array ref) : ["one","two","three",4,5,6]
#10 (P HASH ref) : {c=>"cherry", a=>"apple", b=>"bread"}
#11 (P Pkg ref) : Pkg:{a=>1, b=>2}
------------------
Tests #6 and #7 have been tricky as #7 uses the 'hidden'
output of #6 (it was to a string). #7 requires the output
of #6 ... so
> P.pm 5
#5 (to STDERR) : Hello Perl 5
> P.pm 6
#6 (to strng embedded in #7):
> P.pm 7
#6 (to strng embedded in #7):
#7 (prev string) : prev str="Hello Perl 6" (no LF) && Hello
Perl 7
> then make test (or prove) should take care of the rest. just don't try to
> access your module in any special way from the test script.
====
Now do you see why I want to be able to access the module when I
test?
>
>> I'm not sure, but will I a blib dir if it is a Perl-only distribution?
>
> yes, the build procedure always create a blib dir. at the minimum
----
Ahh... 'build lib', not binary lib...