Include method name in immutable methods (fixes #49680)
[gitmo/Class-MOP.git] / t / 304_constant_codeinfo.t
1 use strict;
2 use warnings;
3 use Test::More tests => 2;
4
5 use Class::MOP;
6
7 {
8     package Foo;
9     use constant FOO => 'bar';
10 }
11
12 my $meta = Class::MOP::Class->initialize('Foo');
13
14 my $syms = $meta->get_all_package_symbols('CODE');
15 is(ref $syms->{FOO}, 'CODE', 'get constant symbol');
16
17 undef $syms;
18
19 $syms = $meta->get_all_package_symbols('CODE');
20 is(ref $syms->{FOO}, 'CODE', 'constant symbol still there, although we dropped our reference');