Update failing tests (by author/import-moose-tests.pl)
[gitmo/Mouse.git] / Moose-t-failing / 020_attributes / 033_accessor_inlining.t
CommitLineData
c47cf415 1#!/usr/bin/env perl
2# This is automatically generated by author/import-moose-test.pl.
3# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4use t::lib::MooseCompat;
5use strict;
6use warnings;
7use Test::More;
8$TODO = q{Mouse is not yet completed};
9
10my $called;
11{
12 package Foo::Meta::Instance;
13 use Mouse::Role;
14
15 sub is_inlinable { 0 }
16
17 after get_slot_value => sub { $called++ };
18}
19
20{
21 package Foo;
22 use Mouse;
23 Mouse::Util::MetaRole::apply_metaroles(
24 for => __PACKAGE__,
25 class_metaroles => {
26 instance => ['Foo::Meta::Instance'],
27 },
28 );
29
30 has foo => (is => 'ro');
31}
32
33my $foo = Foo->new(foo => 1);
34is($foo->foo, 1, "got the right value");
35is($called, 1, "reader was called");
36
37done_testing;