summaryrefslogblamecommitdiffstats
path: root/t/33-constructor-name.t
blob: 5ae1258ce489139fa229cf1221808f3b98406e59 (plain) (tree)
1
2
3
4
5



                   
                









                                  
                              



                                  



                                     
                

                             
        

             
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::Moose;

{
    package Bar;

    sub create { bless {}, shift }
}

{
    package Foo;
    use Moose;
    use Bread::Board::Declare;

    has bar => (
        is               => 'ro',
        isa              => 'Bar',
        constructor_name => 'create',
    );
}

with_immutable {
    my $foo = Foo->new;
    isa_ok($foo->bar, 'Bar');
} 'Foo';

done_testing;