The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use strict;
use warnings;
use utf8;
use Test::More;

{
    package Foo;
}

{
    package MyApp;
    use Class::Data::Lazy qw(
        foo
    );

    sub _build_foo {
        my $class = shift;
        bless [], Foo::;
    }
}

ok(MyApp->can('foo'));
my $f1 = MyApp->foo();
my $f2 = MyApp->foo();
isa_ok $f1, "Foo";
is "$f1", "$f2", 'returns same instance';

done_testing;