in reply to Re: MooseX::Declare and overload
in thread MooseX::Declare and overload

You can see in the MooseX Declare documentation that it implicitly uses namespace::autoclean.

I noticed, but it says the "use namespace::autoclean;" occurs before the "use overload". Something's very buggy.

And then there's the question as to why test 5 worked. Very weird.

Replies are listed 'Best First'.
Re^3: MooseX::Declare and overload
by Haarg (Priest) on Apr 01, 2010 at 17:21 UTC

    namespace::autoclean, unlike namespace::clean, removes all imported functions regardless of if they were imported before or after it is used.

    I don't really know why test 5 worked, but Test::More does have special handling for overloaded objects. I'm assuming it is some odd interaction in there.

      oh! I thought "namespace::autoclean" was "namespace::clean"! Thanks, that makes a lot more sense.