Include method name in immutable methods (fixes #49680)
[gitmo/Class-MOP.git] / t / 304_constant_codeinfo.t
index 3f907fa..2f15af2 100644 (file)
@@ -1,12 +1,8 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
 
-BEGIN {
-    use_ok('Class::MOP');
-}
+use Class::MOP;
 
 {
     package Foo;
@@ -15,10 +11,10 @@ BEGIN {
 
 my $meta = Class::MOP::Class->initialize('Foo');
 
-my %syms = $meta->get_all_package_symbols('CODE');
-is(ref $syms{FOO}, 'CODE', 'get constant symbol');
+my $syms = $meta->get_all_package_symbols('CODE');
+is(ref $syms->{FOO}, 'CODE', 'get constant symbol');
 
-undef %syms;
+undef $syms;
 
-%syms = $meta->get_all_package_symbols('CODE');
-is(ref $syms{FOO}, 'CODE', 'constant symbol still there, although we dropped our reference');
+$syms = $meta->get_all_package_symbols('CODE');
+is(ref $syms->{FOO}, 'CODE', 'constant symbol still there, although we dropped our reference');