I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-04-06 08:31:53-07 by fergal in response to 4777
Re: Object::InsideOut and Test::Deep, the worst ennemies?
For the benefit of those not following along on the CPAN bug, here's a copy of my response.

---
My code doesn't "break" isa. When you define an isa subroutine in a class, it has a special meaning but I'm not defining it in a class, I'm just defining it in a normal package where it should be called as a function, not as a method, this is perfectly valid perl. The same goes for can() and does() subroutines. They only have a special with relation to classes.

The problem is that Devel::StackTrace calls ->isa() on _all_ of the packages it sees in the stack, whether they're classes or not (a more fundamental problem with Perl is that there's no way to tell).

The reason I won't change Test::Deep is because the existing users of Test::Deep have written their tests expecting it to export isa. If it stopped, these test scripts would break and modules authors would receive bug reports and have to make new releases etc etc.

I will however file a bug against Devel::StackTrace and see if we can work out something better than calling ->isa on everything it sees.

---

I would add that unless somewhere in your code you do

$o = bless {}, "main";

or

main->some_method()

then nothing should ever call main::isa as a method.
Direct Responses: Write a response