From: Jesse Luehrs Date: Mon, 15 Nov 2010 18:38:31 +0000 (-0600) Subject: don't hardcode the list of method names X-Git-Tag: 0.15~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc8fb59f6708036f9e62edccbf9dbf2f9c101c00;p=gitmo%2FPackage-Stash-XS.git don't hardcode the list of method names --- diff --git a/t/lib/Package/Stash.pm b/t/lib/Package/Stash.pm index fb25135..b804da4 100644 --- a/t/lib/Package/Stash.pm +++ b/t/lib/Package/Stash.pm @@ -8,9 +8,7 @@ use Package::Stash::XS; BEGIN { my $ps = Package::Stash::XS->new(__PACKAGE__); my $ps_xs = Package::Stash::XS->new('Package::Stash::XS'); - for my $method (qw(new name namespace add_symbol remove_glob has_symbol - get_symbol get_or_add_symbol remove_symbol - list_all_symbols get_all_symbols)) { + for my $method ($ps_xs->list_all_symbols('CODE')) { my $sym = '&' . $method; $ps->add_symbol($sym => $ps_xs->get_symbol($sym)); }