Document XS get_method_map
[gitmo/Class-MOP.git] / t / 304_constant_codeinfo.t
CommitLineData
fa3f5c84 1#!/usr/bin/perl
2
3use strict;
4use warnings;
a1644fa1 5use Test::More tests => 2;
fa3f5c84 6
a1644fa1 7use Class::MOP;
fa3f5c84 8
9{
10 package Foo;
11 use constant FOO => 'bar';
12}
13
14my $meta = Class::MOP::Class->initialize('Foo');
15
16my %syms = $meta->get_all_package_symbols('CODE');
17is(ref $syms{FOO}, 'CODE', 'get constant symbol');
18
19undef %syms;
20
21%syms = $meta->get_all_package_symbols('CODE');
22is(ref $syms{FOO}, 'CODE', 'constant symbol still there, although we dropped our reference');