summaryrefslogtreecommitdiff
path: root/t/exceptions/class-mop-module.t
blob: 604fa882079f6c278f2517a437c5a7d9a8d477bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use strict;
use warnings;

use Test::More;
use Test::Fatal;

use Moose();

{
    my $exception = exception {
        Class::MOP::Module->create_anon(cache => 1);
    };

    like(
        $exception,
        qr/Modules are not cacheable/,
        "can't cache anon packages");

    isa_ok(
        $exception,
        "Moose::Exception::PackagesAndModulesAreNotCachable",
        "can't cache anon packages");
}

done_testing;