Acme-UNIVERSAL-cannot

 view release on metacpan or  search on metacpan

t/cannot.t  view on Meta::CPAN

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');

t/cant.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More tests => 8;
use Test::Exception;

{
    package foo;
    sub quux {}
}

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

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

lives_ok {
    ok !$i->cant('quux');
    ok !$i->can't('quux');



( run in 0.381 second using v1.01-cache-2.11-cpan-de7293f3b23 )