Acme-UNIVERSAL-cannot

 view release on metacpan or  search on metacpan

t/cannot.t  view on Meta::CPAN

use Acme::UNIVERSAL::cannot;
use strict;
use warnings;
use Test::More tests => 6;
use Test::Exception;

{
    package foo;
    sub quux {}
}

my $i = bless {}, 'foo';

lives_ok {
    ok $i->cannot('bar');
};
ok !$i->can('bar');

lives_ok {
    ok !$i->cannot('quux');
};
ok $i->can('quux');



( run in 2.948 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )