Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use Test::More;
- use O qw/-qq Deparse/;
- package Foo;
- sub Bar {}
- package Foo::Bar;
- sub new { bless {}, shift }
- package Foo::Baz;
- sub new { bless {}, shift }
- package main;
- isa_ok Foo::Bar->new, 'Foo::Bar'; # isa_ok Foo::Bar()->new, 'Foo::Bar'
- isa_ok Foo::Bar::->new, 'Foo::Bar'; # 'Foo::Bar'->isa_ok->new, '???'
- isa_ok +Foo::Bar->new, 'Foo::Bar'; # isa_ok Foo::Bar()->new, 'Foo::Bar'
- isa_ok +Foo::Bar::->new, 'Foo::Bar'; # isa_ok 'Foo::Bar'->new, 'Foo::Bar'
- isa_ok Foo::Baz->new, 'Foo::Baz'; # 'Foo::Baz'->isa_ok->new, '???'
- isa_ok Foo::Baz::->new, 'Foo::Baz'; # 'Foo::Baz'->isa_ok->new, '???'
- isa_ok +Foo::Baz->new, 'Foo::Baz'; # isa_ok 'Foo::Baz'->new, 'Foo::Baz'
- isa_ok +Foo::Baz::->new, 'Foo::Baz'; # isa_ok 'Foo::Baz'->new, 'Foo::Baz'
- done_testing;
Add Comment
Please, Sign In to add comment