On Thu, Oct 10, 2002 at 09:42:05PM +0100, Adrian Howard wrote:
> If you stick your loop inside a BEGIN {} block I think you'll find that it
> works as you expect.
> The attribute handler in Test::Class is set to run as a CHECK block (the
> default provided by Attribute::Handlers). Since you don't require the
> module until runtime the handler gets confused.
Yep. That does the trick. Good catch.
> I'm running A::H 0.78 - and in my case it just skips running the
> handler... so no test methods get defined and nothing gets run.
> I am guessing that you're running an earlier version of A::H and that's
> why it's passing ANON as the symbol to the Test::Class handler, hence the
> confusing error message.
Nope, I'm on 0.78 too. I _was_ on 0.76 when the problem first arose, but
one of the first things I tried was updating the modules involved...
I had also tried the eval "use $_" foreach @modules version but that
gives the same problem.
This is with latest CPAN version of Test::Class, Attribute::Handlers and
UNIVERSAL::require with perl 5.8
> Now I need to figure out if:
> (a) this is a bug or a lack of documentation on my part
> (b) if/how it can be fixed :-)
Best bet is just to mention it in the documentation of this area
Thanks a lot.