new_ok allow $objects as params #342

Closed
KES777 opened this Issue Dec 9, 2012 · 3 comments

Comments

Projects
None yet
3 participants

KES777 commented Dec 9, 2012

perl allow two forms to create objects:
CLASSNAME->new()
$object->new()

So you module must allow too:

my $obj1 = new_ok( 'Some::Class' => [] );
my $obj2 = new_ok( $obj1 => [] );

Owner

schwern commented Dec 10, 2012

Makes sense.

That's a simple enough patch to new_ok, it just needs to get the class name
from the object before passing it to isa_ok. Would you like to write it up
yourself? Tests are in t/new_ok.t.

KES777 commented Dec 10, 2012

No, thanks
-- 
С уважением,
 Eugen                          mailto:kes-kes@yandex.ru

Owner

exodist commented Oct 30, 2014

Closing as wontfix. someone can reopen if this is actually something enough people want.

exodist closed this Oct 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment