Your IP : 216.73.216.1


Current Path : /usr/share/doc/perl-Moose/t/bugs/
Upload File :
Current File : //usr/share/doc/perl-Moose/t/bugs/constructor_object_overload.t

use strict;
use warnings;
use Test::More;

{
    package Foo;

    use Moose;

    use overload '""' => sub {''};

    sub bug { 'plenty' }

    __PACKAGE__->meta->make_immutable;
}

ok(Foo->new()->bug(), 'call constructor on object reference with overloading');

done_testing;