Skip Menu |

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

Report information
The Basics
Id: 17929
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Test-MockObject

People
Owner: chromatic [...] cpan.org
Requestors: larry [...] theclapp.org
Cc:
AdminCc:

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



Subject: T::MO::Extends documentation misleading
Test::MockObject::Extends v1.01 Perl v5.8.8 Debian GNU/Linux, kernel 2.5.16, mostly "stable", some "testing" packages. Documentation said my $object = Some::Class->new(); my $mock_object = Test::MockObject::Extends->new( $object ); I assumed from this that I could still use $object independently of $mock_object, but I can't, since Test::MockObject::Extends::new actually blesses $object into a new package and returns it. I think the documentation should actually say my $object = Some::Class->new(); $object = Test::MockObject::Extends->new( $object ); or perhaps just my $object = Some::Class->new(); Test::MockObject::Extends->new( $object ); # modifies $object in place or make it clear in some other way that T::MO::Extends::new changes the class of the object you pass it. Thanks for lots of great test packages & for _Perl Testing_. :) -- Larry Clapp
Good idea, thanks! I've modified the documentation in the synopsis and the description of new() as you suggest.