1#!perl
2
3use Test::More tests => 3;
4use strict;
5use warnings;
6use Sub::Identify ();
7
8sub MODIFY_CODE_ATTRIBUTES {
9    my ($class, $subref, @attributed) = @_;
10    local $TODO = 1;
11    is(Sub::Identify::sub_fullname($subref), 'main::foo', 'half compiled');
12    return ();
13}
14
15sub foo : MyAttribute {}
16
17BEGIN {
18    is(Sub::Identify::sub_fullname(\&foo), 'main::foo', 'full compiled');
19}
20
21is(Sub::Identify::sub_fullname(\&foo), 'main::foo', 'runtime');
22