Skip Menu |

This queue is for tickets about the Test-Class CPAN distribution.

Report information
The Basics
Id: 17264
Status: resolved
Priority: 0/
Queue: Test-Class

People
Owner: Nobody in particular
Requestors: john [...] newchester.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.11
Fixed in: (no value)



Subject: cannot test anonymous subs
Can't run tests on a class that is required at runtime. The code my $package = 'MyTestPackage.pm'; require $package; $package->runtests; Will produce warnings "cannot test anonymous subs," but will not run any tests. Thoughts: Looks like a problem with Attribute::Handlers. A resolution will allow Test::Class to be incorporated into a testing framework that iterates over a list of modules (say from a database of directory) and runs the test.
You now get a much more sensible error message, plus some pointers in the docs on how you can load Test::Class-es dynamically. All in 0.19 - hitting CPAN now :-) adrian