X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F304_constant_codeinfo.t;h=2f15af204333905627af46b769499ebabf75f82d;hb=8e374ce5e500e0e79c3c829b3d9c6154556b39d2;hp=3f907fa0467ec9480127d1441f0fe34808fede25;hpb=fa3f5c84aa99aea642dba9401c2c9d2e033de806;p=gitmo%2FClass-MOP.git diff --git a/t/304_constant_codeinfo.t b/t/304_constant_codeinfo.t index 3f907fa..2f15af2 100644 --- a/t/304_constant_codeinfo.t +++ b/t/304_constant_codeinfo.t @@ -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');